diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2015-03-28 07:07:03 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2015-03-28 07:07:03 +0300 |
commit | 5f7639a0d6e74527930b2c8060898df5177ce82e (patch) | |
tree | 46b4b25429713ad8bc84d6831a2730b7a480457d | |
parent | 7091002966bf6cacc6674a195fd03696dc71edf5 (diff) | |
download | pandoc-5f7639a0d6e74527930b2c8060898df5177ce82e.tar.gz |
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.
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 1 |
1 files changed, 1 insertions, 0 deletions
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') |