git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Yaml block must start immediately after `---`.

If there's a blank line after `---`, we interpreted it as a horizontal rule.

commitab0ffe6549261313410207a0b5beba9284135962 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 29 Oct 2013, 10:57 (13 years ago) parenta6aaff1
1 file changed+1
src/Text/Pandoc/Readers/Markdown.hs+1
src/Text/Pandoc/Readers/Markdown.hs+1
@@ -227,6 +227,7 @@ yamlMetaBlock = try $ do
227227 pos <- getPosition
228228 string "---"
229229 blankline
230+ notFollowedBy blankline -- if --- is followed by a blank it's an HRULE
230231 rawYamlLines <- manyTill anyLine stopLine
231232 -- by including --- and ..., we allow yaml blocks with just comments:
232233 let rawYaml = unlines ("---" : (rawYamlLines ++ ["..."]))