diff options
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/RTF.hs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index a7f795d3f..3d7657bb0 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -112,13 +112,12 @@ writeRTF options doc = do -- of the toc rather than a boolean: . defField "toc" toc else id) metadata - T.pack <$> - case writerTemplate options of - Just tpl -> renderTemplate' tpl context - Nothing -> return $ - case reverse body of - ('\n':_) -> body - _ -> body ++ "\n" + case writerTemplate options of + Just tpl -> renderTemplate' tpl context + Nothing -> return $ T.pack $ + case reverse body of + ('\n':_) -> body + _ -> body ++ "\n" -- | Convert unicode characters (> 127) into rich text format representation. handleUnicode :: String -> String |