diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-11-09 12:59:26 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-11-09 12:59:26 -0800 |
commit | 5fb3b82bdf2accb785380c78cf8481bbe06b73f1 (patch) | |
tree | 57c0e61b00b677f8f2feee6a6138d5977b8c11bd /src/Text | |
parent | d4c73d5e6536535015f953ba2e5c3b83979819af (diff) | |
download | pandoc-5fb3b82bdf2accb785380c78cf8481bbe06b73f1.tar.gz |
Accept empty `--metadata-file`.
Closes #7675. This is a regression from 2.15 behavior.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Metadata.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs index 534a7645b..30760e933 100644 --- a/src/Text/Pandoc/Readers/Metadata.hs +++ b/src/Text/Pandoc/Readers/Metadata.hs @@ -42,6 +42,7 @@ yamlBsToMeta :: (PandocMonad m, HasLastStrPosition st) yamlBsToMeta pMetaValue bstr = do case Yaml.decodeAllEither' bstr of Right (Object o:_) -> fmap Meta <$> yamlMap pMetaValue o + Right [] -> return . return $ mempty Right [Null] -> return . return $ mempty Right _ -> Prelude.fail "expected YAML object" Left err' -> do |