summaryrefslogtreecommitdiff
path: root/pygments/lexers/javascript.py
diff options
context:
space:
mode:
authorMiikka Salminen <miikka.salminen@gmail.com>2015-03-07 22:30:17 +0200
committerMiikka Salminen <miikka.salminen@gmail.com>2015-03-07 22:30:17 +0200
commitb55a3a9f79dc14c146a11aa32230624469ff874b (patch)
tree280cc94008825cf08ee03f6455682a27025d974a /pygments/lexers/javascript.py
parent50c6950c7fa48cce73af6072b35f40608a158306 (diff)
downloadpygments-b55a3a9f79dc14c146a11aa32230624469ff874b.tar.gz
Added a new token type Comment.Hashbang with its documentation, and a support for it in Javascript, Perl, Python, Ruby and Bash lexers.
Diffstat (limited to 'pygments/lexers/javascript.py')
-rw-r--r--pygments/lexers/javascript.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py
index fa7dca41..aed8438e 100644
--- a/pygments/lexers/javascript.py
+++ b/pygments/lexers/javascript.py
@@ -60,7 +60,7 @@ class JavascriptLexer(RegexLexer):
(r'\n', Text, '#pop')
],
'root': [
- (r'\A#! ?/.*?\n', Comment), # shebang lines are recognized by node.js
+ (r'\A#! ?/.*?\n', Comment.Hashbang), # recognized by node.js
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'