diff options
Diffstat (limited to 'src/Text/Pandoc/App.hs')
-rw-r--r-- | src/Text/Pandoc/App.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 58f605a19..5c3ebaed9 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -221,8 +221,9 @@ convertWithOpts opts = do metadataFromFile <- case optMetadataFiles opts of [] -> return mempty - paths -> mapM readFileLazy paths >>= - fmap mconcat . mapM (yamlToMeta readerOpts) + paths -> mconcat <$> + mapM (\path -> do raw <- readFileLazy path + yamlToMeta readerOpts (Just path) raw) paths let transforms = (case optShiftHeadingLevelBy opts of 0 -> id |