From 9c04223086bf606eaac6dc2848af80518210d823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Tue, 23 Jul 2019 13:30:08 +0200 Subject: New upstream version 3.1.0 --- engine/SCons/Scanner/LaTeX.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'engine/SCons/Scanner/LaTeX.py') diff --git a/engine/SCons/Scanner/LaTeX.py b/engine/SCons/Scanner/LaTeX.py index d9e3692..8afe5b0 100644 --- a/engine/SCons/Scanner/LaTeX.py +++ b/engine/SCons/Scanner/LaTeX.py @@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/LaTeX.py a56bbd8c09fb219ab8a9673330ffcd55279219d0 2019-03-26 23:16:31 bdeegan" +__revision__ = "src/engine/SCons/Scanner/LaTeX.py e724ae812eb96f4858a132f5b8c769724744faf6 2019-07-21 00:04:47 bdeegan" import os.path import re @@ -179,15 +179,7 @@ class LaTeX(SCons.Scanner.Base): 'inputfrom', 'subinputfrom'] def __init__(self, name, suffixes, graphics_extensions, *args, **kw): - - # We have to include \n with the % we exclude from the first part - # part of the regex because the expression is compiled with re.M. - # Without the \n, the ^ could match the beginning of a *previous* - # line followed by one or more newline characters (i.e. blank - # lines), interfering with a match on the next line. - # add option for whitespace before the '[options]' or the '{filename}' regex = r''' - ^[^%\n]* \\( include | includegraphics(?:\s*\[[^\]]+\])? @@ -348,7 +340,7 @@ class LaTeX(SCons.Scanner.Base): # Cache the includes list in node so we only scan it once: # path_dict = dict(list(path)) # add option for whitespace (\s) before the '[' - noopt_cre = re.compile('\s*\[.*$') + noopt_cre = re.compile(r'\s*\[.*$') if node.includes is not None: includes = node.includes else: @@ -372,9 +364,9 @@ class LaTeX(SCons.Scanner.Base): inc_list = include[2].split(',') else: inc_list = include[1].split(',') - for j in range(len(inc_list)): - split_includes.append( (inc_type, inc_subdir, inc_list[j]) ) - # + for inc in inc_list: + split_includes.append((inc_type, inc_subdir, inc)) + includes = split_includes node.includes = includes -- cgit v1.2.3