You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this excellent resource! I've found it incredibly useful. I have run into one problem though.
The emoji regex doesn't capture the \uFE0F variation selector that's used to indicate that a non-emoji character like \u2764 (heavy black heart) should be treated as an emoji. Here's a simple repro case:
Here it is again with codepoint escapes instead of literal characters, in case your browser/OS combo actually renders a standalone \u2764 as a red heart (Chrome on OS X doesn't, at least):
This issue seems to be present for all characters that don't have the Emoji_Presentation property (meaning that they default to a text representation rather than an emoji representation unless followed by \uFE0F).
The fix seems to be to match an optional \uFE0F at the end of the regex:
I could see an argument for not capturing \uFE0F by default since that may not always be desirable, so I wasn't sure if this was intentional or not. If it is intentional, it might be helpful to mention this caveat (and the workaround) in the readme.
Thanks again!
The text was updated successfully, but these errors were encountered:
Now the best way to solve this... quite tricky. I suppose the default regex pattern should match everything, including text and emoji representations. I could then add additional regex patterns that are text only, or emoji only, etc. Will have to dig a bit deeper.
Thanks for this excellent resource! I've found it incredibly useful. I have run into one problem though.
The emoji regex doesn't capture the
\uFE0F
variation selector that's used to indicate that a non-emoji character like\u2764
(heavy black heart) should be treated as an emoji. Here's a simple repro case:Here it is again with codepoint escapes instead of literal characters, in case your browser/OS combo actually renders a standalone
\u2764
as a red heart (Chrome on OS X doesn't, at least):This issue seems to be present for all characters that don't have the Emoji_Presentation property (meaning that they default to a text representation rather than an emoji representation unless followed by
\uFE0F
).The fix seems to be to match an optional
\uFE0F
at the end of the regex:I could see an argument for not capturing
\uFE0F
by default since that may not always be desirable, so I wasn't sure if this was intentional or not. If it is intentional, it might be helpful to mention this caveat (and the workaround) in the readme.Thanks again!
The text was updated successfully, but these errors were encountered: