Commits

Rob Hoelz committed 4c50cee

Don't treat escaped quotes as string starters

Comments (0)

Files changed (1)

pygments/lexers/agile.py

     # make sure that quotes in character classes aren't treated as strings
     ( r'<\[.*?\]>', String.Regex ),
     # make sure that '#' characters in quotes aren't treated as comments
-    ( r"'(\\\\|\\[^\\]|[^'\\])*'", String.Regex ),
-    ( r'"(\\\\|\\[^\\]|[^"\\])*"', String.Regex ),
+    ( r"(?<!\\)'(\\\\|\\[^\\]|[^'\\])*'", String.Regex ),
+    ( r'(?<!\\)"(\\\\|\\[^\\]|[^"\\])*"', String.Regex ),
     ( r'#.*?$', Comment.Singleline ),
     ( r'[{]', Text, 'root' ),
     ( '.+?', String.Regex ),