summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorGaurav Jain <gaurav@gauravjain.org>2014-04-14 00:48:31 -0400
committerGaurav Jain <gaurav@gauravjain.org>2014-04-14 00:48:31 -0400
commit3bdae5a385e198dcdbee2d37adac212d780fd380 (patch)
treec1a4736c077be6497ece129c49ea95930e4364b4 /pygments/lexers/compiled.py
parent5cb22b30f482466d27cfd0a0023b59899a9497f4 (diff)
downloadpygments-3bdae5a385e198dcdbee2d37adac212d780fd380.tar.gz
Improve handling of labels
Allow labels to be followed by whitespace. Also remove the ':' from the label highlighting.
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index db69fdc6..58cd6869 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -56,8 +56,8 @@ class CFamilyLexer(RegexLexer):
bygroups(using(this), Comment.Preproc), 'if0'),
('^(' + _ws1 + ')(#)',
bygroups(using(this), Comment.Preproc), 'macro'),
- (r'^(\s*)([a-zA-Z_][a-zA-Z0-9_]*:(?!:))',
- bygroups(Text, Name.Label)),
+ (r'^(\s*)([a-zA-Z_][a-zA-Z0-9_]*)(\s*:)(?!:)',
+ bygroups(Text, Name.Label, Text)),
(r'\n', Text),
(r'\s+', Text),
(r'\\\n', Text), # line continuation