diff options
author | Rob Hoelz <rob@hoelz.ro> | 2014-01-05 16:17:28 +0100 |
---|---|---|
committer | Rob Hoelz <rob@hoelz.ro> | 2014-01-05 16:17:28 +0100 |
commit | 8978b841a5cd82bebb90be01613cf766370aff1e (patch) | |
tree | 87bae7f77696f97e2917f4118e33a97195ed72f1 /pygments/lexers/agile.py | |
parent | 96374702823493cdeb4e789089ca929f758c7327 (diff) | |
download | pygments-8978b841a5cd82bebb90be01613cf766370aff1e.tar.gz |
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 3ae4f9b1..7a752c49 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -2280,7 +2280,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(): |