diff --git a/CHANGELOG.md b/CHANGELOG.md index 91f55ad..6cdfcb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index de8072f..32ed17d 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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): πŸ€ΎπŸ½β€β™€οΈ " @@ -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) ---------------------------------------------------|------------------------------------------