Closed brekk closed 6 years ago
I can add 🗡 to this issue.
Both of those are defined in the Emoji
category but not the Emoji_Presentation
category in the Unicode source data. Technically they're meant to have different representations for "plain text" vs "emoji" modes, based on the presence or absence of the presentation selector U+FE0F
. Unfortunately OSes are notoriously sloppy with adhering to that (see #28 (comment)), and the default regex is not matching the "plain text" variant.
Those characters are matched by the text version of emoji-regex, which ignores the presentation selector:
const emojiRegex = require('emoji-regex')
emojiRegex().test('🎖') // false
const emojiTextRegex = require('emoji-regex/text')
emojiTextRegex().test('🎖') // true
Hey there,
Love this library, but I've been seeing some new(er) emojis that are not matched correctly?
Thanks,
Brekk