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

Incorrect highlighting of HTML in mdx blocks #769

Open
3 of 5 tasks
jasongerbes opened this issue Sep 5, 2024 · 1 comment
Open
3 of 5 tasks

Incorrect highlighting of HTML in mdx blocks #769

jasongerbes opened this issue Sep 5, 2024 · 1 comment
Labels

Comments

@jasongerbes
Copy link

Validations

Describe the bug

I previous versions of Shiki (^0.14.3), MDX code blocks had correct syntax highlighting for both markdown content and HTML code:

before

However, the latest version of Shiki (1.16.2) lacks syntax highlighting for HTML code within MDX blocks:

after

For reference, here's the MDX code snippet:

# Hello World!

<p className="lead">This is an introductory paragraph for the article.</p>

This is a standard markdown paragraph.

Reproduction

Using the Shiki playground (https://shiki.style), select MDX and paste the code snippet from above

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@antfu
Copy link
Member

antfu commented Sep 5, 2024

It seems there are some changes in the upstream grammar: https://github.com/wooorm/markdown-tm-language/commits/0229d1b8fc37a7dea8cf7225d7713ac8a69621ca/source.mdx.tmLanguage

I don't know yet why it happens tho

@antfu antfu added the upstream label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants