Git Product home page Git Product logo

Comments (4)

mislav avatar mislav commented on May 21, 2024 1

Let's see what the Unicode spec says about 2764:

2764 FE0F                                  ; fully-qualified     # ❤️ E2.0 red heart
2764                                       ; unqualified         # ❤ E2.0 red heart

We can see that 2764 without “variation selector 16” (FE0F) is an unqualified emoji:

ED-17a. qualified emoji character — An emoji character in a string that (a) has default emoji presentation or (b) is the first character in an emoji modifier sequence or (c) is not a default emoji presentation character, but is the first character in an emoji presentation sequence.

ED-18. fully-qualified emoji — A qualified emoji character, or an emoji sequence in which each emoji character is qualified.

ED-18a. minimally-qualified emoji — An emoji sequence in which the first character is qualified but the sequence is not fully qualified.

ED-19. unqualified emoji — An emoji that is neither fully-qualified nor minimally qualified.

The way I interpret it, 2764 without FE0F should not render as a color emoji by default, and therefore it should not be matched by emoji-regex.

from emoji-regex.

abrad45 avatar abrad45 commented on May 21, 2024

I don't believe this symbol is an emoji

from emoji-regex.

 avatar commented on May 21, 2024

According to emoji pedia 2764 is an Emoji and part of Emoji 1.0:
https://emojipedia.org/heavy-black-heart/

from emoji-regex.

mathiasbynens avatar mathiasbynens commented on May 21, 2024

@mislav is spot-on.

You can use /text.js to match this character, but the other regular expressions should not match it.

Generally, the philosophy behind emoji-regex is to avoid making decisions about which characters/sequences are emoji and which aren't, and instead let the Unicode Standard make those decisions.

from emoji-regex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.