aboutsummaryrefslogtreecommitdiff
path: root/src/markdown2pdf.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-22 10:30:06 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-22 10:30:06 -0700
commite01ae38a77a6e818b0a4ca3726dff5206b3b85d9 (patch)
treecfeb031c97fd5d5ae5b2221a95cb09f0b808658b /src/markdown2pdf.hs
parent5eec45ec40eaaefa667602cdb7c10de558c938b1 (diff)
downloadpandoc-e01ae38a77a6e818b0a4ca3726dff5206b3b85d9.tar.gz
markdown2pdf: Better error printing.
This goes with the earlier change to -halt-on-error.
Diffstat (limited to 'src/markdown2pdf.hs')
-rw-r--r--src/markdown2pdf.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/markdown2pdf.hs b/src/markdown2pdf.hs
index faae544e7..4866b4163 100644
--- a/src/markdown2pdf.hs
+++ b/src/markdown2pdf.hs
@@ -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"