git.iko.soy/typeable/pandoc
on master help sign in
Changed markdown2pdf.hs so it prints error messages on last attempt.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1654 788f1e2b-df1e-0410-8736-df70ead52e1b

commit56ca3e8dcf955e0685b42cdae8f3c86cca161d51 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateMon 7 Dec 2009, 08:26 (17 years ago) parent2a6803c
1 file changed+2−2
src/markdown2pdf.hs+2−2
src/markdown2pdf.hs+2−2
@@ -64,12 +64,12 @@ runLatexRaw file = do
6464runLatex :: FilePath -> IO (Either String FilePath)
6565runLatex file = step 3
6666 where
67− step 0 = return $ Left "Limit of attempts reached"
6867 step n = do
6968 result <- runLatexRaw file
7069 case result of
7170 Left (Left err) -> return $ Left err
72− Left (Right _ ) -> step (n-1 :: Int)
71+ Left (Right _) | n > 1 -> step (n-1 :: Int)
72+ Left (Right msg) -> return $ Left msg
7373 Right pdfFile -> return $ Right pdfFile
7474
7575checkLatex :: String -> (Bool, Bool, Bool, String)