diff options
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index e01b4a2ff..9c9bfa906 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -198,10 +198,9 @@ pandocToMarkdown opts (Pandoc meta blocks) = do (if isEmpty refs' then empty else blankline <> refs') let context = defField "toc" (render' toc) $ defField "body" main - $ (if not (null (docTitle meta) && null (docAuthors meta) - && null (docDate meta)) - then defField "titleblock" (render' titleblock) - else id) + $ (if isNullMeta meta + then id + else defField "titleblock" (render' titleblock)) $ metadata if writerStandalone opts then return $ renderTemplate' (writerTemplate opts) context |