aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-10-29 10:57:48 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-10-29 10:57:48 -0700
commitab0ffe6549261313410207a0b5beba9284135962 (patch)
tree8abdf73185ab8c08c336eb1655309f18558a5153 /src
parenta6aaff102ef75bf02c9a3256a2a750abae78d0b6 (diff)
downloadpandoc-ab0ffe6549261313410207a0b5beba9284135962.tar.gz
Markdown reader: Yaml block must start immediately after `---`.
If there's a blank line after `---`, we interpreted it as a horizontal rule.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs1
1 files changed, 1 insertions, 0 deletions
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 ++ ["..."]))