Commits

Georg Brandl  committed 0e9c05d

Fixed regex highlighting bugs in Perl lexer (#258), this time for m/.../.

  • Participants
  • Parent commits 356d393

Comments (0)

Files changed (2)

 
 - Fixed a Ruby regex highlighting bug (#476).
 
+- Fixed regex highlighting bugs in Perl lexer (#258).
+
 - Gherkin lexer: Fixed single apostrophe bug and added new i18n keywords.
 
 

File pygments/lexers/agile.py

             (r'@(\\\\|\\\@|[^\@])*@[egimosx]*', String.Regex, '#pop'),
             (r'%(\\\\|\\\%|[^\%])*%[egimosx]*', String.Regex, '#pop'),
             (r'\$(\\\\|\\\$|[^\$])*\$[egimosx]*', String.Regex, '#pop'),
-            (r'!(\\\\|\\!|[^!])*![egimosx]*', String.Regex, '#pop'),
         ],
         'root': [
             (r'\#.*?$', Comment.Single),
             (r's\((\\\\|\\\)|[^\)])*\)\s*', String.Regex, 'balanced-regex'),
 
             (r'm?/(\\\\|\\/|[^/\n])*/[gcimosx]*', String.Regex),
+            (r'm(?=[/!\\{<\[\(@%\$])', String.Regex, 'balanced-regex'),
             (r'((?<==~)|(?<=\())\s*/(\\\\|\\/|[^/])*/[gcimosx]*', String.Regex),
             (r'\s+', Text),
             (r'(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|'