better indentation handling for far-left heredocs and herecomments
This commit is contained in:
parent
a5db69e1af
commit
45669e08c6
|
@ -523,7 +523,7 @@
|
|||
CommentNode.prototype.compile_node = function compile_node(o) {
|
||||
var sep;
|
||||
if (this.type === 'herecomment') {
|
||||
sep = '\n' + this.idt(1);
|
||||
sep = '\n' + this.tab;
|
||||
return "" + this.tab + "/*" + sep + (this.lines.join(sep)) + "\n" + this.tab + "*/";
|
||||
} else {
|
||||
return ("" + this.tab + "//") + this.lines.join(("\n" + this.tab + "//"));
|
||||
|
|
|
@ -368,7 +368,7 @@ exports.CommentNode: class CommentNode extends BaseNode
|
|||
|
||||
compile_node: (o) ->
|
||||
if @type is 'herecomment'
|
||||
sep: '\n' + @idt(1)
|
||||
sep: '\n' + @tab
|
||||
"$@tab/*$sep${ @lines.join(sep) }\n$@tab*/"
|
||||
else
|
||||
"$@tab//" + @lines.join("\n$@tab//")
|
||||
|
|
Loading…
Reference in New Issue