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.
This commit is contained in:
parent
7091002966
commit
5f7639a0d6
1 changed files with 1 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue