-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Astros Code component ignores class:list attribute #9009
Comments
It's not just |
Is it possible though? It renders a Fragment so is it possible to forward props? |
I was thinking we can inject the classes into the raw html string. Either through regex, or through the hast at
|
I was thinking about forwarding any props (with the HTMLAttributes type). Do you think it makes too complicated with regexes? |
If we want to forward any props, I think using the hast would be safest. Regexes are only for the fields we know exists after shiki renders the HTML. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome
Describe the Bug
Astros
Code
component doesn't add classes fromclass:list
attribute:Renders this output without the
test
class in the pre or the code element:What's the expected result?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-fvzhsf?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: