1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

fix compound emoji

This commit is contained in:
Michael Telatynski
2020-01-26 22:15:44 +00:00
parent 661b2415d6
commit a4bbe2ba64

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]$/, "");
}