markdown2pdf: Better error printing.
This goes with the earlier change to -halt-on-error.
This commit is contained in:
parent
5eec45ec40
commit
e01ae38a77
1 changed files with 3 additions and 1 deletions
|
@ -119,7 +119,9 @@ checkLatex "" = (True, False, False, "Could not read log file")
|
|||
checkLatex txt = (err , bib, ref, unlines $! msgs ++ tips)
|
||||
where
|
||||
xs `oneOf` x = any (flip isInfixOf x) xs
|
||||
msgs = filter (oneOf ["Error:", "Warning:"]) (lines txt)
|
||||
msgs = dropWhile (not . errorline) $ lines txt
|
||||
errorline ('!':_) = True
|
||||
errorline _ = False
|
||||
tips = checkPackages msgs
|
||||
err = any (oneOf ["!", "LaTeX Error:", "Latex Error:"]) msgs
|
||||
bib = any (oneOf ["Warning: Citation"
|
||||
|
|
Loading…
Add table
Reference in a new issue