Expanded SCons.Scanner.LaTeX.comment_re to not break on \% master
authorW. Trevor King <wking@drexel.edu>
Fri, 23 Apr 2010 00:53:18 +0000 (20:53 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 23 Apr 2010 00:53:18 +0000 (20:53 -0400)
src/engine/SCons/Scanner/LaTeX.py

index 6969d2be21848da5db0c254f49db73bbe5ae151f..fcf237e9a9107b6dd5d445ae657614e2e099282b 100644 (file)
@@ -175,7 +175,7 @@ class LaTeX(SCons.Scanner.Base):
         # lines), interfering with a match on the next line.
         regex = r'^[^%\n]*\\(include|includegraphics(?:\[[^\]]+\])?|lstinputlisting(?:\[[^\]]+\])?|input|bibliography|usepackage){([^}]*)}'
         self.cre = re.compile(regex, re.M)
-        self.comment_re = re.compile(r'^([^%\n]*)(.*)$', re.M)
+        self.comment_re = re.compile(r'^((?:(?:\\%)|[^%\n])*)(.*)$', re.M)
 
         self.graphics_extensions = graphics_extensions