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

Only one emoji is displayed when the same emoji are lined up #22

Closed
mironal opened this issue Jan 26, 2024 · 4 comments
Closed

Only one emoji is displayed when the same emoji are lined up #22

mironal opened this issue Jan 26, 2024 · 4 comments

Comments

@mironal
Copy link
Contributor

mironal commented Jan 26, 2024

If the same Emoji is lined up as follows, only one will be displayed.

EmojiText(markdown: "Hello :mastodon: :mastodon:", emojis: emojis)

I can work around this by specifying .emojiOmitSpacesBetweenEmojis(false), but is this behavior expected?

image
@divadretlaw
Copy link
Owner

Very interesting, thank you for opening an issue. Looks like the AttributedString merges the runs into one in that case, but with the emoji shortcode twice.

AttributedString: Hello  {
}
mastodonmastodon {
    NSImageURL = custom-emoji://mastodon
}

I will see how that can be improved

@divadretlaw
Copy link
Owner

There doesn't seem to be a direct way to access the raw string (mastodonmastodon) from AttributedString, but I found a workaround that I'm not 100% sure about, but its already available on the main branch.

@divadretlaw
Copy link
Owner

Workaround is in 3.5.0, please let me know in case there are other issues.

@mironal
Copy link
Contributor Author

mironal commented Jan 29, 2024

thanks!

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

No branches or pull requests

2 participants