diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-03-28 13:37:18 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-03-28 13:37:18 -0700 |
commit | 8c6ad05ad336a675f6b5f0b7d2bbe81547a8c948 (patch) | |
tree | a1b43a00005e96f8f3a7fe2c12f68e43336c15f6 | |
parent | 743b680649b403635b0ed948c57f5d439eac6fde (diff) | |
download | pandoc-8c6ad05ad336a675f6b5f0b7d2bbe81547a8c948.tar.gz |
Updated code example in Text.Pandoc.
-rw-r--r-- | src/Text/Pandoc.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs index b36046a5e..3387a7d64 100644 --- a/src/Text/Pandoc.hs +++ b/src/Text/Pandoc.hs @@ -37,10 +37,12 @@ inline links: > module Main where > import Text.Pandoc +> import Text.Pandoc.Error (handleError) > > markdownToRST :: String -> String -> markdownToRST = -> (writeRST def {writerReferenceLinks = True}) . readMarkdown def +> markdownToRST = handleError . +> writeRST def {writerReferenceLinks = True} . +> readMarkdown def > > main = getContents >>= putStrLn . markdownToRST |