From 8bbab9e0e16c4ca6cfb6dbcee3bfde50d161822f Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 27 May 2017 11:38:13 +0300 Subject: [PATCH] beautify: don't add extra \n after comments --- beautify/beautify-css-mod.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/beautify/beautify-css-mod.js b/beautify/beautify-css-mod.js index c2e90f72..b5baa1fd 100644 --- a/beautify/beautify-css-mod.js +++ b/beautify/beautify-css-mod.js @@ -401,17 +401,12 @@ if (!ch) { break; } else if (ch === '/' && peek() === '*') { /* css comment */ - var header = indentLevel === 0; - - if (isAfterNewline || header) { + if (isAfterNewline) { print.newLine(); } print.text(eatComment()); print.newLine(); - if (header) { - print.newLine(true); - } } else if (ch === '/' && peek() === '/') { // single line comment if (!isAfterNewline && last_top_ch !== '{') { print.trim();