Skip to content

Commit

Permalink
fix: fix missing some emoji (#112)
Browse files Browse the repository at this point in the history
fix for ⚡and ♻ maybe other emoji too
  • Loading branch information
vacnex authored Jun 21, 2023
1 parent 94aaeee commit 5507459
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ async function run() {
const customEmojiData = customEmoji.split(',')
if (customEmoji && customEmojiData.length) {
customEmojiData.forEach((item) => {
const emojiIcon = item.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g);
const typeName = item.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, '');
const emojiIcon = item.match(/[\u{1F300}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F1E0}-\u{1F1FF}]/gu);
const typeName = item.replace(/[\u{1F300}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F1E0}-\u{1F1FF}]/gu, '');
if (typeName && emojiIcon) {
types[typeName as keyof typeof types] = emojiIcon[0];
}
Expand Down

0 comments on commit 5507459

Please sign in to comment.