diff options
author | Mauro Bieg <mb21@users.noreply.github.com> | 2019-03-01 06:52:15 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-02-28 22:52:15 -0700 |
commit | 0216b68aae35c2935247667b9c61271e6d122b48 (patch) | |
tree | ec9d4bb8218b4058802d7a55ae8149dce0ea89bf /src/Text/Pandoc/Readers | |
parent | 77faccb505992c944cd1b92f50e4e00d2927682b (diff) | |
download | pandoc-0216b68aae35c2935247667b9c61271e6d122b48.tar.gz |
Markdown Reader: yamlToMeta respects extensions (#5276)
Add ReaderOptions parameter to yamlToMeta [API change].
fixes #5272
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 43cb68b67..da6bdc1a0 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -249,12 +249,11 @@ yamlMetaBlock = try $ do -- | Read a YAML string and convert it to pandoc metadata. -- String scalars in the YAML are parsed as Markdown. -yamlToMeta :: PandocMonad m => BS.ByteString -> m Meta -yamlToMeta bstr = do +yamlToMeta :: PandocMonad m => ReaderOptions -> BS.ByteString -> m Meta +yamlToMeta opts bstr = do let parser = do meta <- yamlBsToMeta bstr return $ runF meta defaultParserState - opts = def{ readerExtensions = pandocExtensions } parsed <- readWithM parser def{ stateOptions = opts } "" case parsed of Right result -> return result |