Surrogate & grapheme JS cited open

emoji-regex matches a text-presentation char followed by U+FE0E (VS15)

Matches a character followed by a text variation selector (U+FE0E)

emoji-regex · mathiasbynens/emoji-regex

Symptom

emoji-regex matches a base character even when it is followed by U+FE0E (the text variation selector), so text-presentation characters are wrongly classified as emoji.

Minimal repro
emojiRegex().test('\u2757\uFE0E') returns true even though U+FE0E requests text presentation.
Fix

Exclude a match followed by VS-15 (U+FE0E); treat only a trailing VS-16 (U+FE0F) or no selector as emoji.

Upstream issue → #emoji-regex-text-vs15

Also in: JavaScript

← all 93 entries