From f7f346e6ee256bd916596a480e46bd36763ed662 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 22 Apr 2010 20:53:18 -0400 Subject: [PATCH] Expanded SCons.Scanner.LaTeX.comment_re to not break on \% --- src/engine/SCons/Scanner/LaTeX.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2