Markdown reader: Yaml block must start immediately after ---.

If there's a blank line after `---`, we interpreted it as
a horizontal rule.
This commit is contained in:
John MacFarlane 2013-10-29 10:57:48 -07:00
parent a6aaff102e
commit ab0ffe6549

View file

@ -227,6 +227,7 @@ yamlMetaBlock = try $ do
pos <- getPosition
string "---"
blankline
notFollowedBy blankline -- if --- is followed by a blank it's an HRULE
rawYamlLines <- manyTill anyLine stopLine
-- by including --- and ..., we allow yaml blocks with just comments:
let rawYaml = unlines ("---" : (rawYamlLines ++ ["..."]))