From 447efa0f9f058f7ee0884e048f1f662678d40a6c Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 26 Mar 2008 21:46:12 +0000 Subject: Fixed bug in RTF writer: Extra spaces were being printed after emphasized, boldface, and other inline elements. Resolves Issue #64. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1274 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Writers/RTF.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Text') diff --git a/Text/Pandoc/Writers/RTF.hs b/Text/Pandoc/Writers/RTF.hs index c95c24b2f..d9b3cfd60 100644 --- a/Text/Pandoc/Writers/RTF.hs +++ b/Text/Pandoc/Writers/RTF.hs @@ -86,7 +86,7 @@ codeStringToRTF str = joinWithSep "\\line\n" $ lines (stringToRTF str) -- | Deal with raw LaTeX. latexToRTF :: String -> String -latexToRTF str = "{\\cf1 " ++ (stringToRTF str) ++ "\\cf0 } " +latexToRTF str = "{\\cf1 " ++ (stringToRTF str) ++ "\\cf0 }" -- | Make a paragraph with first-line indent, block indent, and space after. rtfParSpaced :: Int -- ^ space after (in twips) @@ -260,11 +260,11 @@ inlineListToRTF lst = concatMap inlineToRTF lst -- | Convert inline item to RTF. inlineToRTF :: Inline -- ^ inline to convert -> String -inlineToRTF (Emph lst) = "{\\i " ++ (inlineListToRTF lst) ++ "} " -inlineToRTF (Strong lst) = "{\\b " ++ (inlineListToRTF lst) ++ "} " -inlineToRTF (Strikeout lst) = "{\\strike " ++ (inlineListToRTF lst) ++ "} " -inlineToRTF (Superscript lst) = "{\\super " ++ (inlineListToRTF lst) ++ "} " -inlineToRTF (Subscript lst) = "{\\sub " ++ (inlineListToRTF lst) ++ "} " +inlineToRTF (Emph lst) = "{\\i " ++ (inlineListToRTF lst) ++ "}" +inlineToRTF (Strong lst) = "{\\b " ++ (inlineListToRTF lst) ++ "}" +inlineToRTF (Strikeout lst) = "{\\strike " ++ (inlineListToRTF lst) ++ "}" +inlineToRTF (Superscript lst) = "{\\super " ++ (inlineListToRTF lst) ++ "}" +inlineToRTF (Subscript lst) = "{\\sub " ++ (inlineListToRTF lst) ++ "}" inlineToRTF (Quoted SingleQuote lst) = "\\u8216'" ++ (inlineListToRTF lst) ++ "\\u8217'" inlineToRTF (Quoted DoubleQuote lst) = @@ -273,7 +273,7 @@ inlineToRTF Apostrophe = "\\u8217'" inlineToRTF Ellipses = "\\u8230?" inlineToRTF EmDash = "\\u8212-" inlineToRTF EnDash = "\\u8211-" -inlineToRTF (Code str) = "{\\f1 " ++ (codeStringToRTF str) ++ "} " +inlineToRTF (Code str) = "{\\f1 " ++ (codeStringToRTF str) ++ "}" inlineToRTF (Str str) = stringToRTF str inlineToRTF (Math str) = inlineListToRTF $ readTeXMath str inlineToRTF (TeX str) = "" -- cgit v1.2.3