From 96e12c8a274ea3e08648116f3fb052e3de005560 Mon Sep 17 00:00:00 2001 From: Matthew Sotoudeh Date: Mon, 13 Apr 2020 08:40:01 -0700 Subject: Initial code release --- patches/latexrun-pull-62 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 patches/latexrun-pull-62 (limited to 'patches/latexrun-pull-62') diff --git a/patches/latexrun-pull-62 b/patches/latexrun-pull-62 new file mode 100644 index 0000000..6c42f86 --- /dev/null +++ b/patches/latexrun-pull-62 @@ -0,0 +1,31 @@ +--- latexrun ++++ latexrun +@@ -965,7 +965,7 @@ class LaTeX(Task): + + def __clean_messages(self, msgs): + """Make some standard log messages more user-friendly.""" +- have_undefined_reference = False ++ has_errors = any(msg.typ == 'error' for msg in msgs) + for msg in msgs: + if msg.msg == '==> Fatal error occurred, no output PDF file produced!': + msg = msg._replace(typ='info', +@@ -973,10 +973,15 @@ class LaTeX(Task): + if msg.msg.startswith('[LaTeX] '): + # Strip unnecessary package name + msg = msg._replace(msg=msg.msg.split(' ', 1)[1]) +- if re.match(r'Reference .* undefined', msg.msg): +- have_undefined_reference = True +- if have_undefined_reference and \ +- re.match(r'There were undefined references', msg.msg): ++ if has_errors and re.match( ++ r'.*[Rr]erun to get .* right|.* on page .* undefined', msg.msg ++ ): ++ # Warnings on undefined references may occur in high ++ # numbers when documents fail to build. ++ continue ++ if re.match( ++ r"There were (multiply-defined labels|undefined references)", msg.msg ++ ): + # LaTeX prints this at the end so the user knows it's + # worthwhile looking back at the log. Since latexrun + # makes the earlier messages obvious, this is -- cgit v1.2.3