Sublime-HTMLPrettify icon indicating copy to clipboard operation
Sublime-HTMLPrettify copied to clipboard

Consider beautifying script's line breaks.

Open RiseOoi opened this issue 7 years ago • 0 comments

Consider the following script inside a html file:

...
<script>
$(document).ready(function() {
    $('#fooButton').click(function() {
        $('#fooModal').modal();
    });
});
</script>
...

Everything is good until you do this:

...
<script>
$(document).ready(function() {
    $('#fooButton').click(function() {



        $('#fooModal').modal();



    });
});
</script>
...

Which Sublime-HTMLPrettify fails to cut down the unnecessary line breaks. It simply do nothing for stuffs inside a script block.

Disclaimer: There may be times we need an extra line break, like two huge code blocks with two very different goals. But at least make it so that it allows only 1 extra line breaks and not 2+ unnecessary line breaks.

RiseOoi avatar Apr 05 '19 09:04 RiseOoi