Skip to content

docs(markdown-it): work around fence rule pre code wrapper, close #811 #955

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

Merged
merged 3 commits into from
May 14, 2025

Conversation

olets
Copy link
Contributor

@olets olets commented Mar 1, 2025

Description

markdown-it wraps code block html in <pre><code>.  That can be undesirable when using a Shiki transformer which adds its own <pre><code>. This PR

  • documents this fact
  • points to the markdown-it discussion which is the closest thing to official documentation of how to work around this
  • and links to the package I put together based on that following discussion in a Shiki issue

Linked Issues

Additional context

If you decide to close without merging, please also close #811.

Copy link

netlify bot commented Mar 1, 2025

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit 1039826
🔍 Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/68071fc2487ae400086b29fa
😎 Deploy Preview https://deploy-preview-955--shiki-matsu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 1, 2025

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit 1039826
🔍 Latest deploy log https://app.netlify.com/sites/shiki-next/deploys/68071fc2ff5b750008b2b069
😎 Deploy Preview https://deploy-preview-955--shiki-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu changed the title docs(markdown-it): work around fence rule pre code wrapper [#811] docs(markdown-it): work around fence rule pre code wrapper, close #811 Apr 22, 2025
@antfu antfu merged commit 0efe924 into shikijs:main May 14, 2025
12 checks passed
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

Successfully merging this pull request may close these issues.

using a transformer to add a wrapping element results in extra duplicative nodes
2 participants