1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-14 10:00:53 +00:00

Implement emoji fixing when reading messages

This commit is contained in:
Mm2PL 2021-12-11 21:45:39 +01:00
parent a35387abcf
commit d25da5f284
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9
2 changed files with 3 additions and 2 deletions

View file

@ -47,6 +47,7 @@ export const SKIN_TONES = {
4: '1f3fe',
5: '1f3ff'
};
export const JOINER_REPLACEMENT = /(?<!\u{E0002})\u{E0002}/gu;
export const IMAGE_PATHS = {
google: 'noto',

View file

@ -8,7 +8,7 @@ import {sanitize, createElement} from 'utilities/dom';
import {has, getTwitchEmoteURL, split_chars, getTwitchEmoteSrcSet} from 'utilities/object';
import {EmoteTypes, REPLACEMENT_BASE, REPLACEMENTS} from 'utilities/constants';
import {CATEGORIES} from './emoji';
import {CATEGORIES, JOINER_REPLACEMENT} from './emoji';
const EMOTE_CLASS = 'chat-image chat-line__message--emote',
@ -1592,7 +1592,7 @@ export const Emoji = {
continue;
}
const text = token.text;
const text = token.text.replace(JOINER_REPLACEMENT, "\u200d");
splitter.lastIndex = 0;
let idx = 0, match;