|
|
|
|
@ -58,9 +58,10 @@ function getEmojisBySearchTerm(searchTerm) { |
|
|
|
|
|
|
|
|
|
if (searchRegExp.test(current)) { |
|
|
|
|
const emojiObject = emoji.list[current]; |
|
|
|
|
const { emojiPackage } = emojiObject; |
|
|
|
|
const { emojiPackage, shortnames } = emojiObject; |
|
|
|
|
let tone = ''; |
|
|
|
|
current = current.replace(/:/g, ''); |
|
|
|
|
const alias = shortnames[0] !== undefined ? shortnames[0].replace(/:/g, '') : shortnames[0]; |
|
|
|
|
|
|
|
|
|
if (actualTone > 0 && emoji.packages[emojiPackage].toneList.hasOwnProperty(emoji)) { |
|
|
|
|
tone = `_tone${ actualTone }`; |
|
|
|
|
@ -71,7 +72,8 @@ function getEmojisBySearchTerm(searchTerm) { |
|
|
|
|
for (const key in emoji.packages[emojiPackage].emojisByCategory) { |
|
|
|
|
if (emoji.packages[emojiPackage].emojisByCategory.hasOwnProperty(key)) { |
|
|
|
|
const contents = emoji.packages[emojiPackage].emojisByCategory[key]; |
|
|
|
|
if (contents.indexOf(current) !== -1) { |
|
|
|
|
const searchValArray = alias !== undefined ? alias.replace(/:/g, '').split('_') : alias; |
|
|
|
|
if (contents.indexOf(current) !== -1 || (searchValArray !== undefined && searchValArray.includes(searchTerm))) { |
|
|
|
|
emojiFound = true; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|