aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-08-31 09:44:34 -0700
committerJohn MacFarlane <[email protected]>2022-08-31 09:44:34 -0700
commitb133a8be77cd1bd513206e0dd488c526e240da2f (patch)
tree0cfc53049f005f157b19d9c8261ee6e4f05b8952 /src/Text
parent381ac82222c0ff7f5467a58951d49267bcdc89ee (diff)
RTF writer: add space after unicode escape commands.
Otherwise the `?` character that is there as a fallback for systems that can't process the unicode will be interpreted as the paramater's delimiter, and the NEXT character will be gobbled instead of `?`. Closes #8264 (fixes a problem with disappearing characters after unicode escapes).
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index ff0f4cef2..ad91b46ec 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -134,7 +134,7 @@ handleUnicode = T.concatMap $ \c ->
where
surrogate x = not ( (0x0000 <= ord x && ord x <= 0xd7ff)
|| (0xe000 <= ord x && ord x <= 0xffff) )
- enc x = "\\u" <> tshow (ord x) <> "?"
+ enc x = "\\u" <> tshow (ord x) <> " ?"
-- | Escape special characters.
escapeSpecial :: Text -> Text