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 b24f112
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 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: 2 additions & 2 deletions src/lexer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1219,9 +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
| ^ (?: \s* \# (?! (?:\#\#|\*)[^\#] ) .* )+
| ^ (?: \s* \# (?! (?:\#\#)[^\#] ) .* )+
///

CODE = /^[-=]>/
Expand Down

0 comments on commit b24f112

Please sign in to comment.