aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-28 10:10:23 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-28 10:10:23 -0800
commitc50af7341e2421ad0626386c9660e45853f713d8 (patch)
treea0962f567a9ecf4828eb779d98f8f8e78ed28a7c /src/Text
parent29a17b1767a9b2ad3fb70d37546a1df99676ad40 (diff)
downloadpandoc-c50af7341e2421ad0626386c9660e45853f713d8.tar.gz
Markdown writer: Set title, author, date variables as before.
These are no longer used in the default template, since we use titleblock, but we set them anyway for nondefault template users.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 6af32e7e5..4d848d55b 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -141,7 +141,10 @@ pandocToMarkdown opts (Pandoc (Meta title authors date) blocks) = do
let context = writerVariables opts ++
[ ("toc", render colwidth toc)
, ("body", main)
+ , ("title", render Nothing title')
+ , ("date", render Nothing date')
] ++
+ [ ("author", render Nothing a) | a <- authors' ] ++
[ ("titleblock", render colwidth titleblock)
| not (null title && null authors && null date) ]
if writerStandalone opts