aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-06-27 22:42:55 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-06-27 22:42:55 -0700
commit899a65b7d157193bdcb05bd4027a9e7a7fc3c9cc (patch)
tree7d25a754ed93c137ac6fe1417bfba76de024d5e6 /src/Text/Pandoc/Writers/Markdown.hs
parent9ab60a4d1588cfed153ca9efea9c9546bc0e041b (diff)
downloadpandoc-899a65b7d157193bdcb05bd4027a9e7a7fc3c9cc.tar.gz
Writers: Use defField for defaults.
This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index cd3c1db81..0403940e5 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -145,11 +145,11 @@ pandocToMarkdown opts (Pandoc meta blocks) = do
let main = render' $ body <>
(if isEmpty notes' then empty else blankline <> notes') <>
(if isEmpty refs' then empty else blankline <> refs')
- let context = setField "toc" (render' toc)
- $ setField "body" main
+ let context = defField "toc" (render' toc)
+ $ defField "body" main
$ (if not (null (docTitle meta) && null (docAuthors meta)
&& null (docDate meta))
- then setField "titleblock" (render' titleblock)
+ then defField "titleblock" (render' titleblock)
else id)
$ foldl (\acc (x,y) -> setField x y acc)
metadata (writerVariables opts)