aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/output.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/output.js b/lib/output.js
index 72bcdd5e..bfe6242a 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -413,6 +413,15 @@ function OutputStream(options) {
return c(self, comment);
});
}
+
+ // Keep single line comments after nlb, after nlb
+ if (!output.option("beautify") && comments.length > 0 &&
+ /comment[134]/.test(comments[0].type) &&
+ output.col() !== 0 && comments[0].nlb)
+ {
+ output.print("\n");
+ }
+
comments.forEach(function(c){
if (/comment[134]/.test(c.type)) {
output.print("//" + c.value + "\n");