From e6bd29e9b81ff40f59bb7f7cbca54d352a519576 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Thu, 11 Dec 2014 20:28:47 +0000 Subject: Text.Pandoc.Writers.RTF: Add blankline at end of output Closes #1732 --- src/Text/Pandoc/Writers/RTF.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs index 43405ce3c..dfad4b0e2 100644 --- a/src/Text/Pandoc/Writers/RTF.hs +++ b/src/Text/Pandoc/Writers/RTF.hs @@ -106,7 +106,9 @@ writeRTF options (Pandoc meta@(Meta metamap) blocks) = $ metadata in if writerStandalone options then renderTemplate' (writerTemplate options) context - else body + else case reverse body of + ('\n':_) -> body + _ -> body ++ "\n" -- | Construct table of contents from list of header blocks. tableOfContents :: [Block] -> String -- cgit v1.2.3