Skip to content

Conversation

@shalini-saloni
Copy link

Description

This PR adds a language-<lang> class to the <code> element when rendering HTML.

This improves compatibility with tools that expect CommonMark/Prism-style language classes.

Example output:

<code class="language-js">...</code>

This change is minimal and backward-compatible.

Linked Issues

Fixes #1019

Additional context

This mirrors the same behavior already implemented in the markdown-it transformer and aligns Shiki with other syntax highlighters.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit 4a57101
🔍 Latest deploy log https://app.netlify.com/projects/shiki-next/deploys/691de29e08c5ae0007dc2f93
😎 Deploy Preview https://deploy-preview-1131--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 project configuration.

@netlify
Copy link

netlify bot commented Nov 19, 2025

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit 4a57101
🔍 Latest deploy log https://app.netlify.com/projects/shiki-matsu/deploys/691de29ee4608600085620b2
😎 Deploy Preview https://deploy-preview-1131--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 project configuration.

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.

Feature proposal: give the code tag a language-codeType class

1 participant