From: W. Trevor King Date: Fri, 23 Apr 2010 00:53:18 +0000 (-0400) Subject: Expanded SCons.Scanner.LaTeX.comment_re to not break on \% X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;ds=inline;p=scons.git Expanded SCons.Scanner.LaTeX.comment_re to not break on \% --- diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py index 6969d2be..fcf237e9 100644 --- a/src/engine/SCons/Scanner/LaTeX.py +++ b/src/engine/SCons/Scanner/LaTeX.py @@ -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