summaryrefslogtreecommitdiff
path: root/pygments/lexers/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/python.py')
-rw-r--r--pygments/lexers/python.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py
index 3c1aff56..e0da29f6 100644
--- a/pygments/lexers/python.py
+++ b/pygments/lexers/python.py
@@ -41,7 +41,8 @@ class PythonLexer(RegexLexer):
(r'^(\s*)([rRuU]{,2}"""(?:.|\n)*?""")', bygroups(Text, String.Doc)),
(r"^(\s*)([rRuU]{,2}'''(?:.|\n)*?''')", bygroups(Text, String.Doc)),
(r'[^\S\n]+', Text),
- (r'#.*$', Comment),
+ (r'\A#!.+$', Comment.Hashbang),
+ (r'#.*$', Comment.Single),
(r'[]{}:(),;[]', Punctuation),
(r'\\\n', Text),
(r'\\', Text),