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:
parent
a35387abcf
commit
d25da5f284
2 changed files with 3 additions and 2 deletions
|
@ -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',
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue