From 5f7639a0d6e74527930b2c8060898df5177ce82e Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Sat, 28 Mar 2015 07:07:03 +0300 Subject: Markdown Reader: Require nonempty value in mmd title block `many1Till` will gobble up newline, and then whole following line will match, so I had to use guard here. --- src/Text/Pandoc/Readers/Markdown.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 9d37808ee..8892f60fb 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -329,6 +329,7 @@ kvPair = try $ do skipMany1 spaceNoNewline val <- manyTill anyChar (try $ newline >> lookAhead (blankline <|> nonspaceChar)) + guard $ not . null . trim $ val let key' = concat $ words $ map toLower key let val' = MetaBlocks $ B.toList $ B.plain $ B.text $ trim val return (key',val') -- cgit v1.2.3