From 899a65b7d157193bdcb05bd4027a9e7a7fc3c9cc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 27 Jun 2013 22:42:55 -0700 Subject: 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. --- src/Text/Pandoc/Writers/MediaWiki.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Writers/MediaWiki.hs') diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs index c0f141780..7651c652c 100644 --- a/src/Text/Pandoc/Writers/MediaWiki.hs +++ b/src/Text/Pandoc/Writers/MediaWiki.hs @@ -64,8 +64,8 @@ pandocToMediaWiki opts (Pandoc meta blocks) = do then "\n" else "" let main = body ++ notes - let context = setField "body" main - $ setField "toc" (writerTableOfContents opts) + let context = defField "body" main + $ defField "toc" (writerTableOfContents opts) $ foldl (\acc (x,y) -> setField x y acc) metadata (writerVariables opts) if writerStandalone opts -- cgit v1.2.3