[generator] bug fix

- Fix Whitespace with empty token list
- Force a newline for line comments in concise mode
This commit is contained in:
Jason
2016-02-14 13:42:12 +08:00
parent 39c9066e40
commit 28ca3f7f3a
7 changed files with 29 additions and 10 deletions

View File

@@ -299,7 +299,7 @@ export default class Printer extends Buffer {
// force a newline for line comments when retainLines is set in case the next printed node
// doesn't catch up
if ((this.format.compact || this.format.retainLines) && comment.type === "CommentLine") {
if ((this.format.compact || this.format.concise || this.format.retainLines) && comment.type === "CommentLine") {
val += "\n";
}