aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 5a257a51e..1ba6d2bdd 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -195,11 +195,14 @@ dateLine = try $ do
trimInlinesF . mconcat <$> manyTill inline newline
titleBlock :: MarkdownParser (F Inlines, F [Inlines], F Inlines)
-titleBlock = pandocTitleBlock <|> mmdTitleBlock
+titleBlock = pandocTitleBlock
+ <|> mmdTitleBlock
+ <|> return (mempty, return [], mempty)
pandocTitleBlock :: MarkdownParser (F Inlines, F [Inlines], F Inlines)
pandocTitleBlock = try $ do
guardEnabled Ext_pandoc_title_block
+ lookAhead (char '%')
title <- option mempty titleLine
author <- option (return []) authorsLine
date <- option mempty dateLine