git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Fixed regression in title blocks.

If author field was empty, date was being ignored. Closes #1089.

commit6d0cd9203ce968b96ffa8fc2fbae5a50c99b125b authorJohn MacFarlane <fiddlosopher@gmail.com> dateThu 12 Dec 2013, 22:34 (13 years ago) parent46b37b4
1 file changed+4−4
src/Text/Pandoc/Readers/Markdown.hs+4−4
src/Text/Pandoc/Readers/Markdown.hs+4−4
@@ -215,10 +215,10 @@ pandocTitleBlock = try $ do
215215 author' <- author
216216 date' <- date
217217 return $
218− ( if B.isNull title' then id else B.setMeta "title" title'
219− . if null author' then id else B.setMeta "author" author'
220− . if B.isNull date' then id else B.setMeta "date" date' )
221− nullMeta
218+ (if B.isNull title' then id else B.setMeta "title" title')
219+ . (if null author' then id else B.setMeta "author" author')
220+ . (if B.isNull date' then id else B.setMeta "date" date')
221+ $ nullMeta
222222 updateState $ \st -> st{ stateMeta' = stateMeta' st <> meta' }
223223
224224yamlMetaBlock :: MarkdownParser (F Blocks)