Skip to content

Commit 769f02e

Browse files
Merge pull request #3979 from lydell/herecomments-formatting
Fix formatting of `#`-only lines in herecomments
2 parents c0d44b1 + 52b1749 commit 769f02e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/coffee-script/coffee-script.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffee-script/nodes.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/nodes.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ exports.Comment = class Comment extends Base
584584
makeReturn: THIS
585585

586586
compileNode: (o, level) ->
587-
comment = @comment.replace /^(\s*)# /gm, "$1 * "
587+
comment = @comment.replace /^(\s*)#(?=\s)/gm, "$1 *"
588588
code = "/*#{multident comment, @tab}#{if '\n' in comment then "\n#{@tab}" else ''} */"
589589
code = o.indent + code if (level or o.level) is LEVEL_TOP
590590
[@makeCode("\n"), @makeCode(code)]

0 commit comments

Comments
 (0)