git.iko.soy/typeable/pandoc
on master help sign in
Fixed regression with RTF table of contents.
commit70eeeb82b5956387e5fd4002353655e8199edf62 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 24 Jun 2013, 21:18 (13 years ago) parent08631ef
1 file changed+4−1
src/Text/Pandoc/Writers/RTF.hs+4−1
src/Text/Pandoc/Writers/RTF.hs+4−1
@@ -84,7 +84,10 @@ writeRTF options (Pandoc meta blocks) =
8484 isTOCHeader _ = False
8585 context = setField "body" body
8686 $ setField "spacer" spacer
87− $ setField "toc" (tableOfContents $ filter isTOCHeader blocks)
87+ $ (if writerTableOfContents options
88+ then setField "toc"
89+ (tableOfContents $ filter isTOCHeader blocks)
90+ else id)
8891 $ foldl (\acc (x,y) -> setField x y acc)
8992 metadata (writerVariables options)
9093 in if writerStandalone options