From fedae2f5e03499c37fcbad39ce61942e12b89301 Mon Sep 17 00:00:00 2001 From: Vincent Durmont Date: Mon, 9 Sep 2019 09:24:09 -0700 Subject: [PATCH] Release v5.1.1 --- CHANGELOG.md | 4 +++ README.md | 46 +++++++++++++++++------------------ emoji-table-generator/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abb2a883..aad322d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v5.1.1 + +- Bugfix: respect fitzpatrick modifier when extracting emojis (thanks @sullis) + ## v5.1.0 - Many performance improvements to the parsing of the emojis (thanks @freva) diff --git a/README.md b/README.md index 3f449685..8efc42aa 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ _The missing emoji library for java._ com.vdurmont emoji-java - 5.1.0 + 5.1.1 ``` @@ -25,13 +25,13 @@ You can also download the project, build it with `mvn clean install` and add the ##### Via Gradle: ```gradle -compile 'com.vdurmont:emoji-java:5.1.0' +compile 'com.vdurmont:emoji-java:5.1.1' ``` ##### Via Direct Download: -- Use [releases](https://github.com/vdurmont/emoji-java/releases) tab to download the jar directly. -- Download JSON-java dependency from http://mvnrepository.com/artifact/org.json/json. +- Use [releases](https://github.com/vdurmont/emoji-java/releases) tab to download the jar directly. +- Download JSON-java dependency from http://mvnrepository.com/artifact/org.json/json. ## How to use it? @@ -39,32 +39,32 @@ compile 'com.vdurmont:emoji-java:5.1.0' The `EmojiManager` provides several static methods to search through the emojis database: -- `getForTag` returns all the emojis for a given tag -- `getForAlias` returns the emoji for an alias -- `getAll` returns all the emojis -- `isEmoji` checks if a string is an emoji -- `containsEmoji` checks if a string contains any emoji +- `getForTag` returns all the emojis for a given tag +- `getForAlias` returns the emoji for an alias +- `getAll` returns all the emojis +- `isEmoji` checks if a string is an emoji +- `containsEmoji` checks if a string contains any emoji You can also query the metadata: -- `getAllTags` returns the available tags +- `getAllTags` returns the available tags Or get everything: -- `getAll` returns all the emojis +- `getAll` returns all the emojis ### Emoji model An `Emoji` is a POJO (plain old java object), which provides the following methods: -- `getUnicode` returns the unicode representation of the emoji -- `getUnicode(Fitzpatrick)` returns the unicode representation of the emoji with the provided Fitzpatrick modifier. If the emoji doesn't support the Fitzpatrick modifiers, this method will throw an `UnsupportedOperationException`. If the provided Fitzpatrick is null, this method will return the unicode of the emoji. -- `getDescription` returns the (optional) description of the emoji -- `getAliases` returns a list of aliases for this emoji -- `getTags` returns a list of tags for this emoji -- `getHtmlDecimal` returns an html decimal representation of the emoji -- `getHtmlHexadecimal` returns an html decimal representation of the emoji -- `supportsFitzpatrick` returns true if the emoji supports the Fitzpatrick modifiers, else false +- `getUnicode` returns the unicode representation of the emoji +- `getUnicode(Fitzpatrick)` returns the unicode representation of the emoji with the provided Fitzpatrick modifier. If the emoji doesn't support the Fitzpatrick modifiers, this method will throw an `UnsupportedOperationException`. If the provided Fitzpatrick is null, this method will return the unicode of the emoji. +- `getDescription` returns the (optional) description of the emoji +- `getAliases` returns a list of aliases for this emoji +- `getTags` returns a list of tags for this emoji +- `getHtmlDecimal` returns an html decimal representation of the emoji +- `getHtmlHexadecimal` returns an html decimal representation of the emoji +- `supportsFitzpatrick` returns true if the emoji supports the Fitzpatrick modifiers, else false ### Fitzpatrick modifiers @@ -173,9 +173,9 @@ The same applies for the methods `EmojiParser#parseToHtmlHexadecimal(String)` an You can easily remove emojis from a string using one of the following methods: -- `EmojiParser#removeAllEmojis(String)`: removes all the emojis from the String -- `EmojiParser#removeAllEmojisExcept(String, Collection)`: removes all the emojis from the String, except the ones in the Collection -- `EmojiParser#removeEmojis(String, Collection)`: removes the emojis in the Collection from the String +- `EmojiParser#removeAllEmojis(String)`: removes all the emojis from the String +- `EmojiParser#removeAllEmojisExcept(String, Collection)`: removes all the emojis from the String, except the ones in the Collection +- `EmojiParser#removeEmojis(String, Collection)`: removes the emojis in the Collection from the String For example: @@ -198,7 +198,7 @@ System.out.println(EmojiParser.removeEmojis(str, collection)); You can search a string of mixed emoji/non-emoji characters and have all of the emoji characters returned as a Collection. -- `EmojiParser#extractEmojis(String)`: returns all emojis as a Collection. This will include duplicates if emojis are present more than once. +- `EmojiParser#extractEmojis(String)`: returns all emojis as a Collection. This will include duplicates if emojis are present more than once. ## Credits diff --git a/emoji-table-generator/pom.xml b/emoji-table-generator/pom.xml index 2187b729..1365913e 100644 --- a/emoji-table-generator/pom.xml +++ b/emoji-table-generator/pom.xml @@ -18,7 +18,7 @@ com.vdurmont emoji-java - 5.1.0 + 5.1.1 diff --git a/pom.xml b/pom.xml index 7f2da83b..0e8c8f66 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.vdurmont emoji-java - 5.1.0 + 5.1.1 jar emoji-java