Description of Bug
Affects 2.2.0 (upgrading from 1.9.7).
The README shipped at tag 2.2.0 documents EmojiParser#parseToAliases(String) and
EmojiParser#parseToAliases(String, FitzpatrickAction) (lines 231-251), but the function does not
exist in the code at that tag, and it is not on develop either.
EmojiParser.kt provides parseToUnicode, parseToHtmlDecimal, parseToHtmlHexadecimal,
parseFromUnicode, replaceAllEmojis, removeAllEmojis, removeEmojis, removeAllEmojisExcept
and extractEmojis — there is no emoji → short code transform under any name. So either the API was
dropped accidentally during the 2.x module refactor, or it was dropped deliberately and the
documentation was not updated.
Reproduction Steps
- Depend on
emojify + contract + moshi at 2.2.0.
- Follow the README's "parse to aliases" section:
val emojiManager = EmojiManager.create(context, MoshiDeserializer())
val result = emojiManager.parseToAliases("An 😀awesome 😃string with a few 😉emojis!")
- It fails to compile: unresolved reference
parseToAliases. parseToUnicode, documented a few
lines above it in the same README, resolves fine.
Additional Context
This is the 1.9.7 usage that no longer has an equivalent — outgoing text is stored as short codes,
incoming text is rendered back to emoji:
val payload = emojiManager.parseToAliases(userInput) // emoji -> :short_code:
val display = emojiManager.parseToUnicode(serverText) // :short_code: -> emoji (still fine in 2.2.0)
If the removal was intentional, what is the recommended way to produce :short_code: output in 2.x?
Is parseFromUnicode with a custom EmojiTransformer the intended path, or is a helper planned
(something like parseToShortCodes, mirroring the new getForShortCode)? I am happy to open a PR
restoring it on top of parseFromUnicode if that would be welcome.
I searched the closed issues and did not find this reported.
Description of Bug
Affects
2.2.0(upgrading from1.9.7).The README shipped at tag
2.2.0documentsEmojiParser#parseToAliases(String)andEmojiParser#parseToAliases(String, FitzpatrickAction)(lines 231-251), but the function does notexist in the code at that tag, and it is not on
developeither.EmojiParser.ktprovidesparseToUnicode,parseToHtmlDecimal,parseToHtmlHexadecimal,parseFromUnicode,replaceAllEmojis,removeAllEmojis,removeEmojis,removeAllEmojisExceptand
extractEmojis— there is no emoji → short code transform under any name. So either the API wasdropped accidentally during the 2.x module refactor, or it was dropped deliberately and the
documentation was not updated.
Reproduction Steps
emojify+contract+moshiat2.2.0.parseToAliases.parseToUnicode, documented a fewlines above it in the same README, resolves fine.
Additional Context
This is the 1.9.7 usage that no longer has an equivalent — outgoing text is stored as short codes,
incoming text is rendered back to emoji:
If the removal was intentional, what is the recommended way to produce
:short_code:output in 2.x?Is
parseFromUnicodewith a customEmojiTransformerthe intended path, or is a helper planned(something like
parseToShortCodes, mirroring the newgetForShortCode)? I am happy to open a PRrestoring it on top of
parseFromUnicodeif that would be welcome.I searched the closed issues and did not find this reported.