diff options
author | Tim Hatch <tim@timhatch.com> | 2014-10-07 13:36:40 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-10-07 13:36:40 -0700 |
commit | b6bb2c8014af050d4f11f22e35e2fa4a3e79b242 (patch) | |
tree | 309d0452a17799837162a6f1ca1c6f615107b6d9 /pygments/lexers/jvm.py | |
parent | 292b11fdfa96f33f40380a1053b65a2d5f344783 (diff) | |
download | pygments-b6bb2c8014af050d4f11f22e35e2fa4a3e79b242.tar.gz |
Fix highlighting of Java enhanced for loops.
Fixes #965
Diffstat (limited to 'pygments/lexers/jvm.py')
-rw-r--r-- | pygments/lexers/jvm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py index 86a45d1e..136a0fd7 100644 --- a/pygments/lexers/jvm.py +++ b/pygments/lexers/jvm.py @@ -62,7 +62,7 @@ class JavaLexer(RegexLexer): (r'"(\\\\|\\"|[^"])*"', String), (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char), (r'(\.)((?:[^\W\d]|\$)[\w\$]*)', bygroups(Operator, Name.Attribute)), - (r'([^\W\d]|\$)[\w\$]*:', Name.Label), + (r'^\s*([^\W\d]|\$)[\w\$]*:', Name.Label), (r'([^\W\d]|\$)[\w\$]*', Name), (r'[~\^\*!%&\[\]\(\)\{\}<>\|+=:;,./?-]', Operator), (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float), |