diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-11-27 16:38:46 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-25 17:07:40 +0100 |
commit | 18e85f8dfbf9323945969cdf831c9a16f90299a0 (patch) | |
tree | c47adf1787d486874c54e18b9d19821fc0ca5433 /src/Text/Pandoc.hs | |
parent | bf8fb78389c0d2dc06ad91bc379fde5bd7e1f768 (diff) |
Changed readNative to use PandocMonad.
Diffstat (limited to 'src/Text/Pandoc.hs')
-rw-r--r-- | src/Text/Pandoc.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs index 70d1300b3..34b6b8d0c 100644 --- a/src/Text/Pandoc.hs +++ b/src/Text/Pandoc.hs @@ -183,7 +183,7 @@ import Text.Pandoc.Options import Text.Pandoc.Shared (safeRead, warn, mapLeft, pandocVersion) import Text.Pandoc.MediaBag (MediaBag) import Text.Pandoc.Error -import Text.Pandoc.Class (PandocMonad) +import Text.Pandoc.Class (PandocMonad, runIOorExplode) import Data.Aeson import qualified Data.ByteString.Lazy as BL import Data.List (intercalate) @@ -243,7 +243,7 @@ mkBSReaderWithWarnings r = ByteStringReader $ \o s -> -- | Association list of formats and readers. readers :: [(String, Reader IO)] -readers = [ ("native" , StringReader $ \_ s -> return $ readNative s) +readers = [ ("native" , StringReader $ \_ s -> runIOorExplode (readNative s)) ,("json" , mkStringReader readJSON ) ,("markdown" , mkStringReaderWithWarnings readMarkdownWithWarnings) ,("markdown_strict" , mkStringReaderWithWarnings readMarkdownWithWarnings) |