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

Possible inconsistency with handling emphasis and strong when immediately followed by emphasis #812

Closed
4 tasks done
puopg opened this issue Jan 31, 2024 · 3 comments
Closed
4 tasks done
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@puopg
Copy link

puopg commented Jan 31, 2024

When processing the MD string

***123****456*

<em>
  <strong>123</strong>
</em>
<em>456</em>

React markdown renders what seems to be some additional asterisks?

Screenshot 2024-01-31 at 1 15 46 PM

Initial checklist

Affected packages and versions

9.0.1

Link to runnable example

No response

Steps to reproduce

Compare the result of:

This is just 1 word, where the first half is both italicized and bolded, the 2nd half is only italicized.

The MDAST that gets created from unified() => rehypeParse => rehypeRemark looks correct, so to me the issue seems to be either:

  1. The syntax generated from the processing flow is incorrect.
  2. The syntax is correct, and its React-Markdown's rendering of the syntax that is not correct.

Expected behavior

Screenshot 2024-01-31 at 1 15 38 PM

Actual behavior

Screenshot 2024-01-31 at 1 15 46 PM

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jan 31, 2024
@ChristianMurphy
Copy link
Member

Thanks @puopg!

Tracing this further into the stack.
This is coming from the markdown parser react-markdown uses, micromark https://stackblitz.com/edit/stackblitz-starters-n2yquc

I know there is at least one emphasis related issue open micromark/micromark#92
But this feels different, would you be interested/able to post an issue to micromark @puopg?

@puopg
Copy link
Author

puopg commented Jan 31, 2024

Sure thing, lemme open one and ill link it here.

micromark/micromark#162

@wooorm
Copy link
Member

wooorm commented Feb 1, 2024

Thanks, moving the discussion there :)

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Feb 1, 2024
@github-actions github-actions bot closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

3 participants