aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-06-22 09:55:50 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-06-22 09:55:50 -0700
commit1b07997f4a6870650f20702ed6d962f9471e3d40 (patch)
tree8594fa39d9797e251865d4b8d5ca3a6e088d256f /src/Text/Pandoc
parent086790d986af35a5e6d68013a2c15ae10511db40 (diff)
downloadpandoc-1b07997f4a6870650f20702ed6d962f9471e3d40.tar.gz
Fix regression with comment-only YAML metadata blocks.
Closes #7400.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Metadata.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs
index 45eddf25a..cbc523b25 100644
--- a/src/Text/Pandoc/Readers/Metadata.hs
+++ b/src/Text/Pandoc/Readers/Metadata.hs
@@ -45,6 +45,9 @@ yamlBsToMeta pMetaValue bstr = do
Right [] -> return . return $ mempty
Right [YAML.Doc (YAML.Scalar _ YAML.SNull)]
-> return . return $ mempty
+ -- the following is what we get from a comment:
+ Right [YAML.Doc (YAML.Scalar _ (YAML.SUnknown _ ""))]
+ -> return . return $ mempty
Right _ -> Prelude.fail "expected YAML object"
Left (yamlpos, err')
-> do pos <- getPosition