Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Emoji_Keycap_Sequence in reverse order a legal Emoji? #116

Open
yisibl opened this issue Sep 27, 2024 · 0 comments
Open

Is Emoji_Keycap_Sequence in reverse order a legal Emoji? #116

yisibl opened this issue Sep 27, 2024 · 0 comments

Comments

@yisibl
Copy link

yisibl commented Sep 27, 2024

const emojiRegex = require('emoji-regex');
const text = `
\u{39}\u20E3\uFE0F
\u{39}\uFE0F\u20E3
`;

const regex = emojiRegex();
for (const match of text.matchAll(regex)) {
  const emoji = match[0];
  console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`);
}

Output:

Matched sequence 9⃣ — code points: 2
Matched sequence 9️⃣ — code points: 3

U+FE0F(VS16) reverses the order here, and I'm not sure how the Emoji spec defines this situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant