Closed ricardogama closed 2 years ago
Hello @ricardogama! Thank you for your contribution. The emoji is in data already. You can find it at 3437 line of data.go
@forPelevin You're right, it's there! However, something's not working quite right.
I pushed a new commit removing the duplicated entry, but adding test cases for this particular emoji and they're failing.
Maybe you can checkout the code and debug what's going on?
@forPelevin By replacing the emoji on the list from my source I managed to make the tests pass, WDYT?
@ricardogama, thank you for the info. According to the debug printing, there is a hidden rune in your emoji: https://go.dev/play/p/5JtO7Yn_ylv
@forPelevin I see, that's an issue. I'm using this lib against user input to prevent errors when piping it to another destination.
It worked fine for all cases until now, but for this string in particular I got an error because the lib didn't strip it as I would expect.
At a glance, shouldn't uniseg.Graphemes cover this case? 🤔
@ricardogama Your emoji contains a variation selector (https://en.wikipedia.org/wiki/Variation_Selectors_(Unicode_block) I made a fix (https://github.com/forPelevin/gomoji/pull/9) to detect emojis of this type. Can you look into it? Is that fix ok for you?
Yes that works, I'm closing this one. Thanks!
Seems like 🆕 is not included in the list (ref).
@forPelevin I don't know what to put in
UnicodeName
so I left a ? for now, let me know what to put there.