Markdown reader: Don't generate blank title, author, date elements.
This commit is contained in:
parent
caa89efc32
commit
5a5a252216
1 changed files with 3 additions and 3 deletions
|
@ -221,9 +221,9 @@ pandocTitleBlock = try $ do
|
||||||
title' <- title
|
title' <- title
|
||||||
author' <- author
|
author' <- author
|
||||||
date' <- date
|
date' <- date
|
||||||
return $ B.setMeta "title" title'
|
return $ if B.isNull title' then id else B.setMeta "title" title'
|
||||||
. B.setMeta "author" author'
|
. if null author' then id else B.setMeta "author" author'
|
||||||
. B.setMeta "date" date'
|
. if B.isNull date' then id else B.setMeta "date" date'
|
||||||
|
|
||||||
yamlTitleBlock :: MarkdownParser (F (Pandoc -> Pandoc))
|
yamlTitleBlock :: MarkdownParser (F (Pandoc -> Pandoc))
|
||||||
yamlTitleBlock = try $ do
|
yamlTitleBlock = try $ do
|
||||||
|
|
Loading…
Add table
Reference in a new issue