From 8c6ad05ad336a675f6b5f0b7d2bbe81547a8c948 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 28 Mar 2015 13:37:18 -0700 Subject: Updated code example in Text.Pandoc. --- src/Text/Pandoc.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Text') 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 -- cgit v1.2.3