Merge pull request #3946 from matrix-org/t3chguy/emoji

fix compound emoji
pull/21833/head
Michael Telatynski 2020-01-27 09:42:44 +00:00 committed by GitHub
commit acf09a004f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -79,13 +79,13 @@ EMOJIBASE.forEach(emoji => {
});
/**
* Strips variation selectors from a string
* NB. Skin tone modifers are not variation selectors:
* Strips variation selectors from the end of given string
* NB. Skin tone modifiers are not variation selectors:
* this function does not touch them. (Should it?)
*
* @param {string} str string to strip
* @returns {string} stripped string
*/
function stripVariation(str) {
return str.replace(/[\uFE00-\uFE0F]/, "");
return str.replace(/[\uFE00-\uFE0F]$/, "");
}