git.iko.soy/typeable/pandoc
on master help sign in
Markdown Reader: Require nonempty value in mmd title block
5f7639aNikolay Yakimov
src/Text/Pandoc/Readers/Markdown.hs+1
@@ -329,6 +329,7 @@ kvPair = try $ do
329 skipMany1 spaceNoNewline
329 skipMany1 spaceNoNewline
330 val <- manyTill anyChar
330 val <- manyTill anyChar
331 (try $ newline >> lookAhead (blankline <|> nonspaceChar))
331 (try $ newline >> lookAhead (blankline <|> nonspaceChar))
332+ guard $ not . null . trim $ val
332 let key' = concat $ words $ map toLower key
333 let key' = concat $ words $ map toLower key
333 let val' = MetaBlocks $ B.toList $ B.plain $ B.text $ trim val
334 let val' = MetaBlocks $ B.toList $ B.plain $ B.text $ trim val
334 return (key',val')
335 return (key',val')