diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-24 21:18:21 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-25 22:32:50 -0700 |
commit | 70eeeb82b5956387e5fd4002353655e8199edf62 (patch) | |
tree | e0d399ac5ec0ff8d5e63a192e4e27042b629b388 | |
parent | 08631ef1a3c8a3afe18694bbeb8fd3d6f580a589 (diff) | |
download | pandoc-70eeeb82b5956387e5fd4002353655e8199edf62.tar.gz |
Fixed regression with RTF table of contents.
-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 |