Commits

Rob Hoelz committed 4126633

Reapply: Perform module/role/class check in Perl6 detection with a single regex

  • Participants
  • Parent commits d018f57

Comments (0)

Files changed (1)

File pygments/lexers/agile.py

             return 0.91
 
         for line in text.splitlines():
-            if re.match(r'\s*(?:my|our)?\s*module', line): # module declarations
-                return 0.91
-            if re.match(r'\s*(?:my|our)?\s*role', line): # role declarations
-                return 0.91
-            if re.match(r'\s*(?:my|our)?\s*class\b', line): # class declarations
+            if re.match(r'\s*(?:my|our)?\s*(?:module|role|class)\b', line): # module, role, class declarations
                 return 0.91
         return False