Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the intellij formatter append a blank line after embedded script?

For example, HTML that looks like this:

<script>
    var hello;
</script>

Becomes this after formatting a few times (Code > Reformat code...):

<script>
    var hello;



</script>
like image 347
matt burns Avatar asked Feb 02 '15 15:02

matt burns


1 Answers

I still don't know why the extra line is being added but I found a way to stop it.

File > Settings > Editor > Code Style > HTML > Other > Keep white spaces inside: > Then add script

enter image description here

like image 162
matt burns Avatar answered Oct 05 '22 08:10

matt burns