Smile
Smile copied to clipboard
Smile.unmodify handles ZWJ sequences in potentially unexpected ways
Consider 👩🏻❤️💋👨🏼, which is formed of
- 👩 (woman)
- Light Skin Tone
- ZERO WIDTH JOINER
- HEAVY BLACK HEART
- VARIATION SELECTOR-16
- ZERO WIDTH JOINER
- 💋 (kiss mark)
- ZERO WIDTH JOINER
- 👨 (man)
- Medium-light Skin Tone
If I do
Smile.unmodify(emoji: "👩🏻❤️💋👨🏼")
Everything except the 👩 is removed. This completely changes the meaning of the emoji, which I don't think unmodify
is supposed to do. I had expected 👩❤️💋👨 instead. Is this intentional?
Hi, it is expected to keep just the "prominent" info. Maybe you can try disassemble
method ?
Ah, so you have another method for this purpose :) disassemble
does remove the modifiers, which is what I want. However, it also removes the heart :(