Fix remark emote (#635)
This commit is contained in:
parent
fc58dc5ef4
commit
1eaa172a1b
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ function findNextEmote(value, fromIndex, strictlyFromIndex) {
|
||||||
|
|
||||||
const str = match[0];
|
const str = match[0];
|
||||||
|
|
||||||
if (EMOTES.some(({ name }) => str.toUpperCase() === name)) {
|
if (EMOTES.some(({ name }) => str === name)) {
|
||||||
// Profit!
|
// Profit!
|
||||||
return { text: str, index: match.index };
|
return { text: str, index: match.index };
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ export function inlineEmote() {
|
||||||
const transformer = (node, index, parent) => {
|
const transformer = (node, index, parent) => {
|
||||||
if (node.type === EMOTE_NODE_TYPE && parent && parent.type === 'paragraph') {
|
if (node.type === EMOTE_NODE_TYPE && parent && parent.type === 'paragraph') {
|
||||||
const emoteStr = node.value;
|
const emoteStr = node.value;
|
||||||
const emote = EMOTES.find(({ name }) => emoteStr.toUpperCase() === name);
|
const emote = EMOTES.find(({ name }) => emoteStr === name);
|
||||||
|
|
||||||
node.type = 'image';
|
node.type = 'image';
|
||||||
node.url = emote.url;
|
node.url = emote.url;
|
||||||
|
|
Loading…
Reference in a new issue