diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-27 22:42:55 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-27 22:42:55 -0700 |
commit | 899a65b7d157193bdcb05bd4027a9e7a7fc3c9cc (patch) | |
tree | 7d25a754ed93c137ac6fe1417bfba76de024d5e6 /src/Text/Pandoc/Writers/RTF.hs | |
parent | 9ab60a4d1588cfed153ca9efea9c9546bc0e041b (diff) |
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/RTF.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index 9d22b8ee1..66a2238c7 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -82,10 +82,10 @@ writeRTF options (Pandoc meta blocks) = body = concatMap (blockToRTF 0 AlignDefault) blocks isTOCHeader (Header lev _ _) = lev <= writerTOCDepth options isTOCHeader _ = False - context = setField "body" body - $ setField "spacer" spacer + context = defField "body" body + $ defField "spacer" spacer $ (if writerTableOfContents options - then setField "toc" + then defField "toc" (tableOfContents $ filter isTOCHeader blocks) else id) $ foldl (\acc (x,y) -> setField x y acc) |