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

Improper emoji rendering with v5.1.0 #2865

Closed
davidsandoz opened this issue Jul 3, 2023 · 7 comments · Fixed by #2942
Closed

Improper emoji rendering with v5.1.0 #2865

davidsandoz opened this issue Jul 3, 2023 · 7 comments · Fixed by #2942
Labels
category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@davidsandoz
Copy link

Marked version: v5.1.0

Describe the bug
Emoji rendering fails if located at the beginning or the end of a bold text.

I don't know if this is specific to the bold markup or if the issue happens with other markup.

To Reproduce
Steps to reproduce the behavior:

Here's a markdown text to reproduce the issue:

Situations where it fails:

**test 💁**

**💁 test**

**🤓 test**

**🏖️ test**

Situations where it works:

**💁 **

**⚠️ test**

Here, the emoji rendering works, but the text doesn't get rendered in italic.

*💁 test*

The text above on Markded Demo and on CommonMark Demo

Screenshot of the rendering on Marked Demo:
Screenshot 2023-07-03 at 17 33 19

Expected behavior
A clear and concise description of what you expected to happen.

What is rendered on CommonMark Demo:
Screenshot 2023-07-03 at 17 37 48

@davidsandoz
Copy link
Author

Additional note: It works well with v5.0.5, so this got introduced with v5.1.0.

@UziTech UziTech added L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue category: inline elements labels Jul 3, 2023
@UziTech
Copy link
Member

UziTech commented Jul 3, 2023

@calculuschild Looks like this might have been broken by #2841

@calculuschild
Copy link
Contributor

Are emojis considered punctuation or ?

@UziTech
Copy link
Member

UziTech commented Jul 3, 2023

I don't think these emoji are in \p{P}. It looks like it is not all emoji that are the problem. This is only happening to certain emoji.

@UziTech
Copy link
Member

UziTech commented Jul 17, 2023

@calculuschild I've been trying to get this to work with \p{P} but I don't know if we can. I think the best fix is to revert #2841.
What do you think?

@calculuschild
Copy link
Contributor

calculuschild commented Jul 17, 2023

We can revert if needed, but it fixed several other cases too so we would lose those fixes.

Are emojis considered punctuation or ?

What I meant by this is are emojis meant to be treated as punctuation according to the Commonmark spec?

@UziTech UziTech mentioned this issue Jul 17, 2023
5 tasks
@UziTech
Copy link
Member

UziTech commented Jul 17, 2023

What I meant by this is are emojis meant to be treated as punctuation according to the Commonmark spec?

I don't think so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inline elements L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants