Accept empty --metadata-file.

Closes #7675. This is a regression from 2.15 behavior.
This commit is contained in:
John MacFarlane 2021-11-09 12:59:26 -08:00
parent d4c73d5e65
commit 5fb3b82bdf

View file

@ -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