From fe68e3b439cfd32d7a70eee553349685b030e94b Mon Sep 17 00:00:00 2001 From: Ferdinand Bachmann Date: Sun, 28 Apr 2024 22:58:30 +0200 Subject: [PATCH] fix invalid escape sequences in regexes --- latexrun | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/latexrun b/latexrun index b669d9f..2fe786c 100755 --- a/latexrun +++ b/latexrun @@ -1211,7 +1211,7 @@ class LaTeXFilter: return self.__runaway() if lookingatre(r'(Overfull|Underfull|Loose|Tight) \\[hv]box \('): return self.__bad_box() - if lookingatre('(Package |Class |LaTeX |pdfTeX )?(\w+ )?warning: ', re.I): + if lookingatre(r'(Package |Class |LaTeX |pdfTeX )?(\w+ )?warning: ', re.I): return self.__generic_warning() if lookingatre('No file .*\\.tex\\.$', re.M): # This happens with \includes of missing files. For @@ -1350,7 +1350,7 @@ class LaTeXFilter: stack = [] while self.__avail: m1 = self.__lookingatre(r'<([a-z ]+|\*|read [^ >]*)> |\\.*(->|...)') - m2 = self.__lookingatre('l\.[0-9]+ ') + m2 = self.__lookingatre(r'l\.[0-9]+ ') if m1: found_context = True pre = self.__consume_line().rstrip('\n') @@ -1832,7 +1832,7 @@ class BibTeXFilter: return ('warning', None, None, m.group(1)) if match('^.*> ERROR - (.*)$'): - m2 = re.match("BibTeX subsystem: (.*?), line (\d+), (.*)$", m.group(1)) + m2 = re.match(r"BibTeX subsystem: (.*?), line (\d+), (.*)$", m.group(1)) if m2: return ('error', m2.group(1), m2.group(2), m2.group(3)) return ('error', None, None, m.group(1))