Use the standard space helper for comment space.

This commit is contained in:
Logan Smyth 2016-04-17 21:43:36 -07:00
parent 680fcc16d7
commit 710f151d31

View File

@ -287,14 +287,11 @@ export default class Printer extends Buffer {
// whitespace before
this.newline(this.whitespace.getNewlinesBefore(comment));
if (!this.endsWith(["[", "{"])) this.space();
let column = this.position.column;
let val = this.generateComment(comment);
if (column && !this.endsWith(["\n", " ", "[", "{"])) {
this._push(" ");
column++;
}
//
if (comment.type === "CommentBlock" && this.format.indent.adjustMultilineComment) {
let offset = comment.loc && comment.loc.start.column;