Markdown reader: Don't generate blank title, author, date elements.

This commit is contained in:
John MacFarlane 2013-08-17 10:29:12 -07:00
parent caa89efc32
commit 5a5a252216

View file

@ -221,9 +221,9 @@ pandocTitleBlock = try $ do
title' <- title
author' <- author
date' <- date
return $ B.setMeta "title" title'
. B.setMeta "author" author'
. B.setMeta "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'
yamlTitleBlock :: MarkdownParser (F (Pandoc -> Pandoc))
yamlTitleBlock = try $ do