From ab0ffe6549261313410207a0b5beba9284135962 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 29 Oct 2013 10:57:48 -0700 Subject: Markdown reader: Yaml block must start immediately after `---`. If there's a blank line after `---`, we interpreted it as a horizontal rule. --- src/Text/Pandoc/Readers/Markdown.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 5456f25b5..8f804f863 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -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 ++ ["..."])) -- cgit v1.2.3