Markdown reader: Fixed regression in title blocks.
If author field was empty, date was being ignored. Closes #1089.
This commit is contained in:
parent
46b37b4ddc
commit
6d0cd9203c
1 changed files with 4 additions and 4 deletions
|
@ -215,10 +215,10 @@ pandocTitleBlock = try $ do
|
|||
author' <- author
|
||||
date' <- date
|
||||
return $
|
||||
( if B.isNull title' then id else B.setMeta "title" title'
|
||||
. if null author' then id else B.setMeta "author" author'
|
||||
. if B.isNull date' then id else B.setMeta "date" date' )
|
||||
nullMeta
|
||||
(if B.isNull title' then id else B.setMeta "title" title')
|
||||
. (if null author' then id else B.setMeta "author" author')
|
||||
. (if B.isNull date' then id else B.setMeta "date" date')
|
||||
$ nullMeta
|
||||
updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' }
|
||||
|
||||
yamlMetaBlock :: MarkdownParser (F Blocks)
|
||||
|
|
Loading…
Add table
Reference in a new issue