diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-06-22 09:55:50 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-06-22 09:55:50 -0700 |
commit | 1b07997f4a6870650f20702ed6d962f9471e3d40 (patch) | |
tree | 8594fa39d9797e251865d4b8d5ca3a6e088d256f /src/Text/Pandoc | |
parent | 086790d986af35a5e6d68013a2c15ae10511db40 (diff) | |
download | pandoc-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.hs | 3 |
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 |