Commits

Rob Hoelz committed d018f57

Reapply: Improve Perl 6 heuristic to check for member variables

  • Participants
  • Parent commits 48a6fde

Comments (0)

Files changed (1)

pygments/lexers/agile.py

             return 0.91
         if re.search(r'[$@%]\?[A-Z]+', text): # Perl 6 compiler variables ($?PACKAGE)
             return 0.91
-        if re.search(r'[$@%][!.][A-Za-z0-9_-]+', text): # Perl 6 member variables
+        if re.search(r'[$@%][!.][A-Za-z_][A-Za-z0-9_-]*', text): # Perl 6 member variables
             return 0.91
         if re.search(r'[*][@%&]', text): # Slurpy parameters
             # Scalar slurpies (*$slurp) are not included because they're more rare