From 2db861991a2aca5dfd1550ca71b7e88547a8c82c Mon Sep 17 00:00:00 2001 From: DW <36347199+chocological00@users.noreply.github.com> Date: Sat, 1 Feb 2020 22:10:23 -0500 Subject: [PATCH] Add ZWSP when federating emojis for Mastodon compatibility (#5810) * Add ZWSP when federating emojis for Mastodon compatibility * Use unicode escape sequence --- src/mfm/toHtml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mfm/toHtml.ts b/src/mfm/toHtml.ts index a44e70830..129229215 100644 --- a/src/mfm/toHtml.ts +++ b/src/mfm/toHtml.ts @@ -87,7 +87,7 @@ export function toHtml(tokens: MfmForest | null, mentionedRemoteUsers: IMentione }, emoji(token) { - return doc.createTextNode(token.node.props.emoji ? token.node.props.emoji : `:${token.node.props.name}:`); + return doc.createTextNode(token.node.props.emoji ? token.node.props.emoji : `\u200B:${token.node.props.name}:\u200B`); }, hashtag(token) {