Commits

Tim Hatch committed 1ed98ab

In Ruby, parse Foo::Bar as namespace, not hash key.

Fixes #860

Comments (0)

Files changed (1)

pygments/lexers/agile.py

             (r":'(\\\\|\\'|[^'])*'", String.Symbol),
             (r"'(\\\\|\\'|[^'])*'", String.Single),
             (r':"', String.Symbol, 'simple-sym'),
-            (r'([a-zA-Z_][a-zA-Z0-9]*)(:)',
+            (r'([a-zA-Z_][a-zA-Z0-9]*)(:)(?!:)',
              bygroups(String.Symbol, Punctuation)),  # Since Ruby 1.9
             (r'"', String.Double, 'simple-string'),
             (r'(?<!\.)`', String.Backtick, 'simple-backtick'),