public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d78ae20
)
Keep single line comments after nlb, after nlb
author
Anthony Van de Gejuchte
<anthonyvdgent@yahoo.com>
Fri, 9 Jan 2015 15:46:40 +0000
(16:46 +0100)
committer
Richard van Velzen
<rvanvelzen1@gmail.com>
Mon, 26 Jan 2015 11:11:52 +0000
(12:11 +0100)
Fixes #583
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
72bcdd5
..
bfe6242
100644
(file)
--- 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");