label ZWJ as such
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
69ea635398
commit
0c32daa162
1 changed files with 3 additions and 1 deletions
|
@ -62,6 +62,8 @@ export const DATA_BY_CATEGORY = {
|
||||||
"flags": [],
|
"flags": [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const ZERO_WIDTH_JOINER = "\u200D";
|
||||||
|
|
||||||
// Store various mappings from unicode/emoticon/shortcode to the Emoji objects
|
// Store various mappings from unicode/emoticon/shortcode to the Emoji objects
|
||||||
EMOJIBASE.forEach((emoji: IEmojiWithFilterString) => {
|
EMOJIBASE.forEach((emoji: IEmojiWithFilterString) => {
|
||||||
const categoryId = EMOJIBASE_GROUP_ID_TO_CATEGORY[emoji.group];
|
const categoryId = EMOJIBASE_GROUP_ID_TO_CATEGORY[emoji.group];
|
||||||
|
@ -70,7 +72,7 @@ EMOJIBASE.forEach((emoji: IEmojiWithFilterString) => {
|
||||||
}
|
}
|
||||||
// This is used as the string to match the query against when filtering emojis
|
// This is used as the string to match the query against when filtering emojis
|
||||||
emoji.filterString = `${emoji.annotation}\n${emoji.shortcodes.join('\n')}}\n${emoji.emoticon || ''}\n` +
|
emoji.filterString = `${emoji.annotation}\n${emoji.shortcodes.join('\n')}}\n${emoji.emoticon || ''}\n` +
|
||||||
`${emoji.unicode.split("\u200D").join("\n")}`.toLowerCase();
|
`${emoji.unicode.split(ZERO_WIDTH_JOINER).join("\n")}`.toLowerCase();
|
||||||
|
|
||||||
// Add mapping from unicode to Emoji object
|
// Add mapping from unicode to Emoji object
|
||||||
// The 'unicode' field that we use in emojibase has either
|
// The 'unicode' field that we use in emojibase has either
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue