Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit ba97e35

Browse files
Merge pull request #1100 from ssbc/fix-emoji-colon-bug
fix: workaround bug where node-emoji returns extra colons
2 parents 7d6e838 + 5f751f4 commit ba97e35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/depject/message/html/markdown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ exports.create = function (api) {
5050
if (emojiMentions[emoji]) {
5151
return renderEmoji(emoji, api.blob.sync.url(emojiMentions[emoji]))
5252
} else {
53-
return `<span class="Emoji">${nodeEmoji.get(emoji)}</span>`
53+
// https://github.com/omnidan/node-emoji/issues/76
54+
const emojiCharacter = nodeEmoji.get(emoji).replace(/:/g, '')
55+
return `<span class="Emoji">${emojiCharacter}</span>`
5456
}
5557
},
5658
toUrl: (id) => {

0 commit comments

Comments
 (0)