Commits

Rob Hoelz committed f370737

Match shebangs containing pugs for Perl 6 detector

  • Participants
  • Parent commits caca76a

Comments (0)

Files changed (1)

File pygments/lexers/agile.py

 
             return stripped_lines
 
+        # XXX handle block comments
         lines = text.splitlines()
         lines = strip_pod(lines)
 
-        if shebang_matches(text, r'perl6|rakudo|niecza'):
+        if shebang_matches(text, r'perl6|rakudo|niecza|pugs'):
             return True
 
+        for line in lines:
+            line = re.sub('#.*', '', line)
+            if re.match('^\s*$', line):
+                continue
+
+            #if re.match('', line):
+                #return True
+
         return False
 
     def __init__(self, **options):