Skip to content

Commit

Permalink
Release v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
janlelis committed Nov 6, 2024
1 parent 1afedf2 commit dcfe469
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# CHANGELOG

### 4.0.0 (unreleased)
- **Breaking change:** Regexes now include single skin tone modifiers and hair components.
### 4.0.0

- **Breaking change:** Regexes now include single skin tone modifiers (`🏻`) and hair components (`🦰`).
They were previously considered to be invalid partial Emoji, however since they are supposed to be
displayed as Emoji in isolation, they are now part of the regexes (see *ED-20* in UTS51).
- **Breaking change:** Drop `REGEX_ANY` in favor of `REGEX_PROP_EMOJI`
- Expose regexes for Emoji props (`REGEX_PROP_*`). The advantage over using the native regex properties
directly is that you will be able to use the Emoji support level of this gem instead of Ruby's.
For example, as of releasing this, the current Emoji version is 16.0, while Ruby is at 15.0.
Also see README for a table listing the regexes that match Emoji properties.
- Add `REGEX_EMOJI_KEYCAP` for matching specifically Emoji keycaps
- Use character class instead of lookbehind for native text emoji and non-emoji pictographic regexes

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unicode::Emoji [![[version]](https://badge.fury.io/rb/unicode-emoji.svg)](https://badge.fury.io/rb/unicode-emoji) [![[ci]](https://github.com/janlelis/unicode-emoji/workflows/Test/badge.svg)](https://github.com/janlelis/unicode-emoji/actions?query=workflow%3ATest)

Provides regular expressions to find Emoji in strings, incorporating the latest Unicode / Emoji standards.
Provides various sophisticated regular expressions to work with Emoji in strings,
incorporating the latest Unicode / Emoji standards.

Additional features:

Expand All @@ -26,12 +27,13 @@ require "unicode/emoji"

string = "String which contains all types of Emoji sequences:
- Singleton Emoji: 😴
- Textual singleton Emoji with Emoji variation: ▶️
- Basic Emoji: 😴
- Textual Emoji with Emoji variation (VS16): ▶️
- Emoji with skin tone modifier: 🛌🏽
- Region flag: 🇵🇹
- Sub-Region flag: 🏴󠁧󠁢󠁳󠁣󠁴󠁿
- Keycap sequence: 2️⃣
- Skin tone modifier: 🏻
- Sequence using ZWJ (zero width joiner): 🤾🏽‍♀️
"

Expand Down Expand Up @@ -142,7 +144,7 @@ More info about valid vs. recommended Emoji can also be found in this [blog arti

### Emoji Property Regexes

Ruby includes native regex Emoji properties, as listed in the following table. You can also opt-in to use the `*_PROP_*` regexes to get the Emoji support level of this gem (instead of Rubies).
Ruby includes native regex Emoji properties, as listed in the following table. You can also opt-in to use the `*_PROP_*` regexes to get the Emoji support level of this gem (instead of Ruby's).

Gem Regex (`Unicode::Emoji`'s Emoji support level) | Native Regex (Ruby's Emoji support level)
---------------------------------------------------|------------------------------------------
Expand Down

0 comments on commit dcfe469

Please sign in to comment.