···
35
35
'😣', '🤢', '🤮', '🥴', '😮💨', '😳', '😵', '🌾', '🍦', '📱', '📖', '💭',
36
36
'1️⃣', '2️⃣', '🟡', '🟤'];
37
37
38
38
+
// Sort emojis by length (longest first) to handle compound emojis correctly
39
39
+
const sortedEmojis = [...toiletEmojis].sort((a, b) => b.length - a.length);
40
40
+
38
41
// Look for any of these emojis in the text
39
39
-
for (const testEmoji of toiletEmojis) {
42
42
+
for (const testEmoji of sortedEmojis) {
40
43
if (options.text.includes(testEmoji)) {
41
44
emoji = testEmoji;
42
45
cleanText = options.text.replace(testEmoji, '').trim();