D
D
Dmitry Straju2016-03-18 00:31:01
Sublime Text
Dmitry Straju, 2016-03-18 00:31:01

How to remove line breaks from Html-css-js-prettify?

Good afternoon, I installed the wonderful plugin Html-css-js-prettify. Everything is great, except that it wraps comments in an HTML document to a new line by default. When div blocks are large, I like to write a comment next to the closing tag, for example:

<div class="carousel">        
    <div class="carousel-wrapper">
        <div class="carousel-items">
        ........... тут много строка  ........
        </div> <!-- .carousel-items -->
    </div> <!-- .carousel-wrapper -->
</div> <!-- .carousel -->

After running the plugin, I get
<div class="carousel">        
    <div class="carousel-wrapper">
        <div class="carousel-items">
        ........... тут много строка  ........
        </div>
        <!-- .carousel-items -->
    </div>
    <!-- .carousel-wrapper -->
</div>
<!-- .carousel -->

For me, such a record is not familiar, I immediately get confused. I've tried changing the default settings, but it doesn't help. Tried to edit *.js plugin files. It seems like the beautify-html.js file has something about these comments and how to process them, but my knowledge is clearly not enough to properly edit the file.
As an option, I would be very happy with the option when the Html-css-js-prettify plugin does NOT create new lines at all, but simply builds the correct nesting of the code using the required number of spaces.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Suglobov, 2016-05-16
@Suglobov

Data\Packages\HTML-CSS-JS Prettify\scripts\node_modules\js-beautify\js\lib\beautify-html.js: find in this file "';
matched = true;
}*/
I think this is not the coolest way, but I didn't think of another

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question