diff options
author | Rob Hoelz <rob@hoelz.ro> | 2014-01-12 18:31:21 +0100 |
---|---|---|
committer | Rob Hoelz <rob@hoelz.ro> | 2014-01-12 18:31:21 +0100 |
commit | e8591a3594e89e98be2890fd99d12e68a459a840 (patch) | |
tree | abc823cff2386f3a48785eb3847a8bf28b3362b8 /pygments/lexers/agile.py | |
parent | ea48e49bbd14b25ee87bfe3e8752c177d3961ecf (diff) | |
download | pygments-e8591a3594e89e98be2890fd99d12e68a459a840.tar.gz |
Reapply: Fix up special sub detector for Perl 6 heuristics
Diffstat (limited to 'pygments/lexers/agile.py')
-rw-r--r-- | pygments/lexers/agile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index d80b356a..21363d33 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -2281,7 +2281,7 @@ class Perl6Lexer(ExtendedRegexLexer): # in Perl 6, and also (more importantly) they are a glob deference in # Perl 5. return 0.91 - if re.search(r'sub\s+\w+:(?![(:])', text): # Special sub/method syntax (ex. sub postcircumfix:<[ ]>) + if re.search(r'sub\s+\w+:\w*[^a-zA-Z0-9{(: ]', text): # Special sub/method syntax (ex. sub postcircumfix:<[ ]>) return 0.91 for line in text.splitlines(): |