fix compound emoji
This commit is contained in:
parent
661b2415d6
commit
a4bbe2ba64
1 changed files with 3 additions and 3 deletions
|
@ -79,13 +79,13 @@ EMOJIBASE.forEach(emoji => {
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Strips variation selectors from a string
|
* Strips variation selectors from the end of given string
|
||||||
* NB. Skin tone modifers are not variation selectors:
|
* NB. Skin tone modifiers are not variation selectors:
|
||||||
* this function does not touch them. (Should it?)
|
* this function does not touch them. (Should it?)
|
||||||
*
|
*
|
||||||
* @param {string} str string to strip
|
* @param {string} str string to strip
|
||||||
* @returns {string} stripped string
|
* @returns {string} stripped string
|
||||||
*/
|
*/
|
||||||
function stripVariation(str) {
|
function stripVariation(str) {
|
||||||
return str.replace(/[\uFE00-\uFE0F]/, "");
|
return str.replace(/[\uFE00-\uFE0F]$/, "");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue