beautify: don't add extra \n after comments
This commit is contained in:
parent
ddc5cc0ccf
commit
8bbab9e0e1
|
@ -401,17 +401,12 @@
|
||||||
if (!ch) {
|
if (!ch) {
|
||||||
break;
|
break;
|
||||||
} else if (ch === '/' && peek() === '*') { /* css comment */
|
} else if (ch === '/' && peek() === '*') { /* css comment */
|
||||||
var header = indentLevel === 0;
|
if (isAfterNewline) {
|
||||||
|
|
||||||
if (isAfterNewline || header) {
|
|
||||||
print.newLine();
|
print.newLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
print.text(eatComment());
|
print.text(eatComment());
|
||||||
print.newLine();
|
print.newLine();
|
||||||
if (header) {
|
|
||||||
print.newLine(true);
|
|
||||||
}
|
|
||||||
} else if (ch === '/' && peek() === '/') { // single line comment
|
} else if (ch === '/' && peek() === '/') { // single line comment
|
||||||
if (!isAfterNewline && last_top_ch !== '{') {
|
if (!isAfterNewline && last_top_ch !== '{') {
|
||||||
print.trim();
|
print.trim();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user