diff options
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index b87ef0fd3..8f942b4d0 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -107,11 +107,11 @@ writeRTF options (Pandoc meta@(Meta metamap) blocks) = (tableOfContents $ filter isTOCHeader blocks) else id) $ metadata - in if writerStandalone options - then renderTemplate' (writerTemplate options) context - else case reverse body of - ('\n':_) -> body - _ -> body ++ "\n" + in case writerTemplate options of + Just tpl -> renderTemplate' tpl context + Nothing -> case reverse body of + ('\n':_) -> body + _ -> body ++ "\n" -- | Construct table of contents from list of header blocks. tableOfContents :: [Block] -> String |