summaryrefslogtreecommitdiff
path: root/pygments/lexers/agile.py
diff options
context:
space:
mode:
authorRob Hoelz <rob@hoelz.ro>2013-03-19 21:52:30 +0100
committerRob Hoelz <rob@hoelz.ro>2013-03-19 21:52:30 +0100
commit224c67b3983af4b160586b64c56a97acd7a256e7 (patch)
treefaf4929e37400263c8dd30d146d7e63ee5e1a685 /pygments/lexers/agile.py
parent0914611defd19b89d9987ea698a42952d73b1dcd (diff)
downloadpygments-224c67b3983af4b160586b64c56a97acd7a256e7.tar.gz
Make sure that words containing 'regex' aren't highlighted as a keyword
Diffstat (limited to 'pygments/lexers/agile.py')
-rw-r--r--pygments/lexers/agile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index 46717f48..7d7bc23e 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -2164,7 +2164,7 @@ class Perl6Lexer(ExtendedRegexLexer):
( r'^(\s*)=begin\s+(\w+)\b.*?^\1=end\s+\2', Comment.Multiline ),
( r'^(\s*)=for.*?\n\s*?\n', Comment.Multiline ),
( r'^=.*?\n\s*?\n', Comment.Multiline ),
- ( r'(regex|token|rule)(\s*[' + PERL6_IDENTIFIER_CHARS + ']+:sym<.*?>)?(.*?)([{])', bygroups(Keyword, Name, Name, Text), 'token' ),
+ ( r'(regex|token|rule)(?![' + PERL6_IDENTIFIER_CHARS + '])(\s*[' + PERL6_IDENTIFIER_CHARS + ']+:sym<.*?>)?(.*?)([{])', bygroups(Keyword, Name, Name, Text), 'token' ),
# deal with a special class in the Perl 6 grammar (role q { ... })
( r'(role)(\s*)(q)(\s*)', bygroups(Keyword, Text, Name, Text) ),
( _build_word_match(PERL6_KEYWORDS, PERL6_IDENTIFIER_CHARS), Keyword ),