Reputation: 19419
I can prevent extra blank lines in the HTML part of my file with this:
"html.format.extraLiners": " "
but how can I prevent extra blank lines between styles from the style section at the top of the file?
<html>
<head>
<style>
#c {
background-color: red;
}
#b {
background-color: green;
}
#c {
background-color: blue;
}
</style>
</head>
<body>
<div id="a">A</div>
<div id="b">B</div>
<div id="c">C</div>
</body>
</html>
Thanks.
Upvotes: 4
Views: 970
Reputation: 102
I've looked for what should be a simple solution to this for a long time. Didn't want to install an extension just to handle something so simple, but that's the only way I've found to fix it...
Add the rule below to the file.
{ "newline_between_rules": false }
Upvotes: 3