parse emoji shortcodes in messages
This commit is contained in:
parent
07251e0804
commit
704ec5915f
1 changed files with 9 additions and 0 deletions
|
|
@ -49,5 +49,14 @@ export default {
|
|||
const regexExp = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/gi;
|
||||
return regexExp.test(str); // true
|
||||
},
|
||||
|
||||
|
||||
replaceAllEmojiCodes(content) {
|
||||
let regex = /:([^\s]+):/gm;
|
||||
content = content.replaceAll(regex, (match) => {
|
||||
return this.shortcodeToEmoji(match);
|
||||
})
|
||||
return content;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue