Commits

gbrandl  committed 495ef5f

#422: fix another Perl heredoc lexing bug.

  • Participants
  • Parent commits 68bfb51
  • Branches trunk

Comments (0)

Files changed (2)

   the Scala lexer (#392), the INI lexer (#391), the Clojure lexer (#387)
   and the AS3 lexer (#389).
 
-- Fix two Perl heredoc lexing bugs (#729, #400).
+- Fix three Perl heredoc lexing bugs (#729, #400, #422).
 
 - Fix a bug in the image formatter which misdetected lines (#380).
 

File pygments/lexers/agile.py

              r'utime|values|vec|wait|waitpid|wantarray|warn|write'
              r')\b', Name.Builtin),
             (r'((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\b', Name.Builtin.Pseudo),
-            (r'<<([a-zA-Z_][a-zA-Z0-9_]*);?\n.*?\n\1\n', String),
+            (r'<<([\'"]?)([a-zA-Z_][a-zA-Z0-9_]*)\1;?\n.*?\n\2\n', String),
             (r'__END__', Comment.Preproc, 'end-part'),
             (r'\$\^[ADEFHILMOPSTWX]', Name.Variable.Global),
             (r"\$[\\\"\[\]'&`+*.,;=%~?@$!<>(^|/-](?!\w)", Name.Variable.Global),