diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-12-12 22:34:13 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-12-12 22:34:56 -0800 |
commit | 6d0cd9203ce968b96ffa8fc2fbae5a50c99b125b (patch) | |
tree | 976ee788380f7626eb08940b17e84c6d63996f5a /src/Text/Pandoc | |
parent | 46b37b4ddcd83fbb813b55fb3b253b0fed1f69e3 (diff) | |
download | pandoc-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.hs | 8 |
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) |