Closed flipactual closed 9 years ago
+1
I'm sure there's a reason for this […]
For the record, the reason is this one (emphasis added):
unicode-tr51 contains data extracted from the
emoji-data.txt
file that is part of Unicode Technical Report #51. _Specifically, the data lists all emoji symbols that lack a text equivalent._
1️⃣ is '1\uFE0F\u20E3'
, i.e. 1 followed by a variation selector, followed by COMBINING ENCLOSING KEYCAP. Since U+0031 U+20E3 appears in the emoji data text file, this would match after stripping variation selectors from the input, if unicode-tr51 didn’t specifically exclude emoji that have a textual representation by default. Perhaps that should change, though.
Changed both projects to include text emoji as well. @flipactual You’ll want to use https://github.com/mathiasbynens/strip-variation-selectors on the input before running emoji-regex on it.
:relaxed:, :one:, and :heart: for example.
I'm sure there's a reason for this, but my app needs them to match.
Would you consider an optional parameter that would also match these characters? Maybe something like:
I'd be happy to put the PR in, just wanted to check if this is a desirable feature.