aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-12-12 22:34:13 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-12-12 22:34:56 -0800
commit6d0cd9203ce968b96ffa8fc2fbae5a50c99b125b (patch)
tree976ee788380f7626eb08940b17e84c6d63996f5a /src/Text/Pandoc
parent46b37b4ddcd83fbb813b55fb3b253b0fed1f69e3 (diff)
downloadpandoc-6d0cd9203ce968b96ffa8fc2fbae5a50c99b125b.tar.gz
Markdown reader: Fixed regression in title blocks.
If author field was empty, date was being ignored. Closes #1089.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index e77dda8d7..8014d480c 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -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)