Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emojis are not removed #47

Open
WoaDmulL opened this issue Apr 17, 2018 · 5 comments
Open

Emojis are not removed #47

WoaDmulL opened this issue Apr 17, 2018 · 5 comments

Comments

@WoaDmulL
Copy link

The new emojis like 馃, 馃, 馃, 馃fail to be removed.

Check this gist https://gist.github.com/octohedron/3823d081eb1b92abe93b570875ec77f4

@davidmogar davidmogar added the bug label Apr 17, 2018
@davidmogar
Copy link
Owner

Thank you for the report. I'll try to fix this as soon as possible.

@davidmogar
Copy link
Owner

davidmogar commented Apr 24, 2018

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?

@WoaDmulL
Copy link
Author

WoaDmulL commented Apr 27, 2018

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.

@davidmogar
Copy link
Owner

Yeah, that is the current behavior. The problem with it is that you lose information in the process. Contemplate the next scenario:

  • Today I'm 馃槃
  • Today I'm 馃槩

In both cases, applying the current code you'd get Today I'm what removes completely the useful information.

Just something to think about...

@WoaDmulL
Copy link
Author

WoaDmulL commented Apr 27, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants