Open WoaDmulL opened 6 years ago
Thank you for the report. I'll try to fix this as soon as possible.
I'm currently considering removing the current regex and use instead this library as it would allow to replace the emojis with text. That was the initial goal. What do you think?
I think it would be better to remove them by default; and replace them with some custom setting or optional argument passed to the function when needed. Or the opposite way.
Yeah, that is the current behavior. The problem with it is that you lose information in the process. Contemplate the next scenario:
In both cases, applying the current code you'd get Today I'm
what removes completely the useful information.
Just something to think about...
We could cover all cases:
normalize("Today I'm 😄") => Today I'm 😄
strip_emoji("Today I'm 😄") => Today I'm
describe_emoji("Today I'm 😄") => Today I'm happy
The new emojis like 🤗, 🥂, 🤔, 🤘fail to be removed.
Check this gist https://gist.github.com/octohedron/3823d081eb1b92abe93b570875ec77f4