Updated code example in Text.Pandoc.
commit8c6ad05ad336a675f6b5f0b7d2bbe81547a8c948
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 28 Mar 2015, 13:37 (12 years ago)
parent743b680
src/Text/Pandoc.hs+4−2
@@ -37,10 +37,12 @@ inline links:
3737
3838> module Main where
3939> import Text.Pandoc
40+> import Text.Pandoc.Error (handleError)
4041>
4142> markdownToRST :: String -> String
42−> markdownToRST =
43−> (writeRST def {writerReferenceLinks = True}) . readMarkdown def
43+> markdownToRST = handleError .
44+> writeRST def {writerReferenceLinks = True} .
45+> readMarkdown def
4446>
4547> main = getContents >>= putStrLn . markdownToRST
4648