diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index cc59be4be..9d22b8ee1 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -84,7 +84,10 @@ writeRTF options (Pandoc meta blocks) = isTOCHeader _ = False context = setField "body" body $ setField "spacer" spacer - $ setField "toc" (tableOfContents $ filter isTOCHeader blocks) + $ (if writerTableOfContents options + then setField "toc" + (tableOfContents $ filter isTOCHeader blocks) + else id) $ foldl (\acc (x,y) -> setField x y acc) metadata (writerVariables options) in if writerStandalone options |