Commits

Rob Hoelz committed 7ec2493

Reapply: Add Perl 6 heuristic: check for special method names

  • Participants
  • Parent commits ecbaae0

Comments (0)

Files changed (1)

File pygments/lexers/agile.py

             # 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:<[ ]>)
+            return 0.91
 
         for line in text.splitlines():
             if re.match(r'\s*(?:my|our)?\s*module', line): # module declarations