Skip to content

Commit

Permalink
improve regex
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenko committed Mar 4, 2018
1 parent 56464f3 commit e2b2db5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/coffeescript/lexer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/lexer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,9 @@ COMMENT = ///
# match herecomment, e.g. ### comment ###
^ \s* \#\#\# ( [^\#][\s\S]*? ) (?: \#\#\#[^\n\S]* | \#\#\#$ )
# match alternative herecomment: , e.g. #* comment *#
| ^ \s* \#\* ( [\s\S]*? ) (?: \*\#[^\n\S]* | \*\#$ )
| ^ \s* \#\* ( ([\s\S](?! \#\* ))*? ) (?: \*\#[^\n\S]* | \*\#$ )
# match line comment starting with `#*`
| ^ (?: \s* \#\* (?: [^\n] )*? ).*
# match line comment
| ^ (?: \s* \# (?! (?:\#\#|\*)[^\#] ) .* )+
///
Expand Down

0 comments on commit e2b2db5

Please sign in to comment.