diff options
author | Matthew Sotoudeh <matthewsot@outlook.com> | 2020-04-13 08:40:01 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthewsot@outlook.com> | 2020-04-13 08:40:01 -0700 |
commit | 96e12c8a274ea3e08648116f3fb052e3de005560 (patch) | |
tree | cc419696e4e062fc7173876073598c98cae0aa63 /patches/latexrun-pull-62 | |
parent | 229b0f318e0160013c9c5700a22cc13da37fdcd8 (diff) |
Initial code release
Diffstat (limited to 'patches/latexrun-pull-62')
-rw-r--r-- | patches/latexrun-pull-62 | 31 |
1 files changed, 31 insertions, 0 deletions
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 |