diff options
author | Georg Brandl <georg@python.org> | 2014-10-17 17:40:46 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-17 17:40:46 +0200 |
commit | 239f6074a34cd91280595d8eb2d5771a64bb579d (patch) | |
tree | faf201ba4781b45322b7d907331107a20c6030af /pygments | |
parent | e58cec4383921b7ab6fcae37188c6fcf4c1bde80 (diff) | |
download | pygments-239f6074a34cd91280595d8eb2d5771a64bb579d.tar.gz |
Javascript: allow shebangs
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/javascript.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index f7e4e478..99361aaf 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -59,6 +59,7 @@ class JavascriptLexer(RegexLexer): (r'\n', Text, '#pop') ], 'root': [ + (r'^#! ?/.*?\n', Comment), # shebang lines are recognized by node.js (r'^(?=\s|/|<!--)', Text, 'slashstartsregex'), include('commentsandwhitespace'), (r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|' |