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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace_named_moji_with_images doesn't work with aliases #36

Closed
nmdoliveira opened this issue Nov 4, 2016 · 1 comment
Closed

replace_named_moji_with_images doesn't work with aliases #36

nmdoliveira opened this issue Nov 4, 2016 · 1 comment
Assignees

Comments

@nmdoliveira
Copy link

I'm not sure if this is intended, but I was expecting that replace_named_moji_with_images would work with aliases too. My specific case is :robot_face:: its actual name is :robot: and :robot_face: is an alias. But when I call Gemojione.replace_named_moji_with_images(":robot_face:"), it returns ":robot_face:".

Looking at the source, I suppose it's because the regex used in this method (shortname_moji_regex) is generated from the Index's @emoji_by_code, and aliases are added to @emoji_by_name. Would it be acceptable if aliases were added to @emoji_by_code too? If so, I could make a pull request for that.

Thanks in advance 😄

@jonathanwiesel
Copy link
Contributor

This would be a good enhancement to add for the gem. Will add it to the backlog. Thanks @nmdoliveira

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