@@ -106,7 +106,9 @@ writeRTF options (Pandoc meta@(Meta metamap) blocks) =
106 $ metadata
106 $ metadata
107 in if writerStandalone options
107 in if writerStandalone options
108 then renderTemplate' (writerTemplate options) context
108 then renderTemplate' (writerTemplate options) context
109+ else case reverse body of
109− else body
110+ ('\n':_) -> body
111-- | Construct table of contents from list of header blocks.
113-- | Construct table of contents from list of header blocks.
112tableOfContents :: [Block] -> String
114tableOfContents :: [Block] -> String