diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-12-10 16:52:35 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-25 17:07:41 +0100 |
commit | 2e7b0c7edaac9fbba52ac3cbc6380dbfb74805cf (patch) | |
tree | a467c1c7312e488cf4626698f4de02c9a9ff4184 /src/Text/Pandoc/Readers | |
parent | 6643e401eed85d1a1366b1d2193fb06e285c7448 (diff) | |
download | pandoc-2e7b0c7edaac9fbba52ac3cbc6380dbfb74805cf.tar.gz |
Added ReaderOptions parameter to readNative.
This makes it similar to the other readers -- even
though ReaderOptions is essentially ignored, the uniformity
is nice.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Native.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Native.hs b/src/Text/Pandoc/Readers/Native.hs index 3e934e43f..1953c0c83 100644 --- a/src/Text/Pandoc/Readers/Native.hs +++ b/src/Text/Pandoc/Readers/Native.hs @@ -32,6 +32,7 @@ module Text.Pandoc.Readers.Native ( readNative ) where import Text.Pandoc.Definition import Text.Pandoc.Shared (safeRead) +import Text.Pandoc.Options (ReaderOptions) import Control.Monad.Except (throwError) import Text.Pandoc.Error @@ -48,9 +49,10 @@ import Text.Pandoc.Class -- > Pandoc nullMeta [Plain [Str "hi"]] -- readNative :: PandocMonad m - => String -- ^ String to parse (assuming @'\n'@ line endings) + => ReaderOptions + -> String -- ^ String to parse (assuming @'\n'@ line endings) -> m Pandoc -readNative s = +readNative _ s = case maybe (Pandoc nullMeta <$> readBlocks s) Right (safeRead s) of Right doc -> return doc Left _ -> throwError $ PandocParseError "couldn't read native" |