Comments (4)
I think it's a bug because unicode without variation selector is just text and if there is variation selector after it should be rendered as image and only then it should be match as emoji.
I have another issue, What about pizza symbol:
🍕️
"\ud83c\udf55\ufe0f"
https://emojipedia.org/slice-of-pizza/
U+1F355 U+FE0F
is this emoji with variation selector a valid emoji sequence? Becasue it matches only first two codepoints of surrogate pair and ignore variation selector.
from emoji-regex.
@jcubic Let's look up U+1F355 in https://unicode.org/Public/emoji/latest/emoji-data.txt. It contains:
1F337..1F37C ; Emoji # 6.0 [70] (🌷..🍼) tulip..baby bottle
...
1F337..1F37C ; Emoji_Presentation # 6.0 [70] (🌷..🍼) tulip..baby bottle
It has Emoji_Presentation=True
, so it doesn't need the U+FE0F to be displayed as an emoji (per the spec).
from emoji-regex.
Oh, thanks, I was not sure about this one.
from emoji-regex.
macOS and iOS emoji input has recently improved to be more in line with the spec. I'm hoping Apple has solved (or will continue to solve) this problem so that we don't need to work around it in emoji-regex.
For your use case, you could check if the string ends with a variation selector, and remove it before further processing the string.
from emoji-regex.
Related Issues (20)
- © is recognised as an emoji HOT 2
- Typescript error when using require('emoji-regex') HOT 3
- Is this lib basically doing /\p{Emoji}|\p{Default_Ignorable_Code_Point}/gu ? HOT 3
- Question around choice of factory HOT 2
- Determine emoji type? HOT 2
- rename License file?
- some variations of emojis are not working with current version of emoji-regex library
- The face-exhaling emoji isn't matched correctly
- Node 20 LTS supports the new proposed RegExp flag linked in the source HOT 1
- Why does the second result return false? HOT 2
- Japanese emoji dont support in your version HOT 1
- Certain emoji sequences are not recognized HOT 8
- Shopping Bag emoji doesn't match HOT 1
- typescript synthetic import HOT 2
- npm install emoji-regex returns MODULE_NOT_FOUND HOT 2
- Symbol # and Number 0-9 HOT 3
- .npmrc breaks local install HOT 1
- Does not match some emoji HOT 2
- How to use emoji-regex v10.0.0 with regexp unicode flag HOT 2
- Add changelog HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emoji-regex.