Fixed regression with RTF table of contents.

This commit is contained in:
John MacFarlane 2013-06-24 21:18:21 -07:00
parent 08631ef1a3
commit 70eeeb82b5

View file

@ -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