From a4bbe2ba645d6f411313b4b87b38a6783feec4c5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 26 Jan 2020 22:15:44 +0000 Subject: [PATCH] fix compound emoji --- src/emoji.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emoji.js b/src/emoji.js index 125864e381..20b05531ca 100644 --- a/src/emoji.js +++ b/src/emoji.js @@ -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]$/, ""); }