git.iko.soy/typeable/pandoc
on master help sign in
Text.Pandoc.Writers.RTF: Add blankline at end of output

Closes #1732

commite6bd29e9b81ff40f59bb7f7cbca54d352a519576 authorMatthew Pickering <matthewtpickering@gmail.com> dateThu 11 Dec 2014, 20:28 (12 years ago) parenta17f6f2
1 file changed+3−1
src/Text/Pandoc/Writers/RTF.hs+3−1
src/Text/Pandoc/Writers/RTF.hs+3−1
@@ -106,7 +106,9 @@ writeRTF options (Pandoc meta@(Meta metamap) blocks) =
106106 $ metadata
107107 in if writerStandalone options
108108 then renderTemplate' (writerTemplate options) context
109− else body
109+ else case reverse body of
110+ ('\n':_) -> body
111+ _ -> body ++ "\n"
110112
111113-- | Construct table of contents from list of header blocks.
112114tableOfContents :: [Block] -> String