Skip to content

Conversation

@tenjo-t
Copy link

@tenjo-t tenjo-t commented Aug 17, 2025

Description

hast uses className instead of class. Utilities such as hast-util-classnames handle only className.

The HTML attributes class and for respectively become className and htmlFor in alignment with the DOM. No other attributes gain different names as properties, other than a change in casing.
https://github.com/syntax-tree/hast?tab=readme-ov-file#propertyname

Linked Issues

#1033

Additional context

processNode was modified in #896.

@netlify
Copy link

netlify bot commented Aug 17, 2025

Deploy Preview for shiki-next ready!

Name Link
🔨 Latest commit dfbe5cd
🔍 Latest deploy log https://app.netlify.com/projects/shiki-next/deploys/68a2f94baa495d0008841d8c
😎 Deploy Preview https://deploy-preview-1061--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 Aug 17, 2025

Deploy Preview for shiki-matsu ready!

Name Link
🔨 Latest commit dfbe5cd
🔍 Latest deploy log https://app.netlify.com/projects/shiki-matsu/deploys/68a2f94b1890ae0008f24380
😎 Deploy Preview https://deploy-preview-1061--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.

@antfu antfu changed the title fix(hast): unwrap a Root node and rename property class to className fix(hast)!: unwrap a Root node and rename property class to className Aug 18, 2025
@antfu
Copy link
Member

antfu commented Aug 18, 2025

I think this would be a breaking change that we need to pending it until the next major

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is it Appropriate for @shikijs/rehype to Output a HAST Root Node?

2 participants