devmoji icon indicating copy to clipboard operation
devmoji copied to clipboard

Emoji is output with variation selector

Open kohanyirobert opened this issue 10 months ago • 0 comments

Hey! I've started using this tool and bumped into a weird issue. To sum it up, I ended up with this commit message using the tool

docs: 📚️ mention commit-check and rulesets

Which is fine, but the emoji is actually U+1F4DA followed by U+FE0F.

This trips up a tool (commit-check) I use to validate commit messages on GitHub. The tool uses Python re module and even if I tweak my regex to match emojis this broke it (and it was an ugly ass regex to begin with since Python doesn't support stuff like \p{Emoji} and similar, so one have to match on Unicode ranges).

But I digress. Is this intended instead of outputting simple 📚 which is just U+1F4DA? I would expect the tool to output the most basic form/variation of emojis wherever possible. For example, on Windows, using Win+. can be used to type emojis, and typing "books" outputs a single Unicode code point emoji (equal to the latter version of the emoji in question).

I use devmoji like this

devmoji --edit --lint "$1"

kohanyirobert avatar Feb 22 '25 22:02 kohanyirobert