Properly detect multi-character emoji
Previously emoji likeπ¨βπ¨βπ¦ (:man-man-boy:) were decoded as :man::man::boy: (π¨ π¨ π¦ ) even though there is a specific emoji entry for :man-man-boy:. The solution is to change how the regexp is constructed. Instead of not setting a sort order for the emoji that go into the regexp we use reverse alphabetical order to ensure that any emoji that are inclusive of another (such as :man-man-boy: including :man) get sorted BEFORE the emoji that they include. We accomplish this by using a `SortedSet` and implementing `<=>` on `Emoji`
Showing
Please
register
or
sign in
to comment