Upgrade emojibase-bindings and remove local handling of emoticon variations (#127)
* Updgrade emojibase-bindings and remove local handling of emoticon variations * bump bindings to fix issue of mission emojis with version == 0 * update lockfile * test emoji variation in RTE
This commit is contained in:
parent
3a59556749
commit
c71dc6b0f8
6 changed files with 34 additions and 19 deletions
|
@ -388,7 +388,9 @@ function shouldIncrementEndIndex(text: string, index: number): boolean {
|
|||
*/
|
||||
export function getMappedSuggestion(text: string, isAutoReplaceEmojiEnabled?: boolean): MappedSuggestion | null {
|
||||
if (isAutoReplaceEmojiEnabled) {
|
||||
const emoji = EMOTICON_TO_EMOJI.get(text.toLocaleLowerCase());
|
||||
// variations of plaintext emoitcons(E.g. :P vs :p vs :-P) are handled upstream by the emojibase-bindings/emojibase libraries.
|
||||
// See rules for variations here https://github.com/milesj/emojibase/blob/master/packages/core/src/generateEmoticonPermutations.ts#L3-L32
|
||||
const emoji = EMOTICON_TO_EMOJI.get(text);
|
||||
if (emoji?.unicode) {
|
||||
return { keyChar: "", text: emoji.unicode, type: "custom" };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue