Skip to content

Commit 9495bea

Browse files
feat: include text preceeding special case emojis, include ™ symbol in excluded emojisxcluded emojis (diegomura#2502)
* Include text preceeding special case emojis, include ™ symbol in excluded emojis * Create sharp-mirrors-taste.md --------- Co-authored-by: Diego Muracciole <[email protected]>
1 parent ff86e1e commit 9495bea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/text/emoji.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const fetchEmojis = (string, source) => {
6767
return promises;
6868
};
6969

70-
const specialCases = ['©️', '®']; // Do not treat these as emojis if emoji not present
70+
const specialCases = ['©️', '®', '™']; // Do not treat these as emojis if emoji not present
7171

7272
export const embedEmojis = fragments => {
7373
const result = [];
@@ -101,7 +101,7 @@ export const embedEmojis = fragments => {
101101
},
102102
});
103103
} else if (isSpecialCase) {
104-
result.push({ string: emoji, attributes: fragment.attributes });
104+
result.push({ string: chunk, attributes: fragment.attributes });
105105
} else {
106106
// If no emoji data, we just replace the emoji with a nodef char
107107
result.push({

0 commit comments

Comments
 (0)