-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
fix: ProseCode class attribute warning #2121
Conversation
β Deploy Preview for nuxt-content canceled.Built without sensitive environment variables
|
we can just wrap the slot in |
render a single root node the class prop will be automatically inherited
Thanks for the PR. from: content/src/runtime/markdown-parser/handler/code.ts Lines 27 to 29 in d7bccdc
to: [h(node, 'pre', {}, [h(node, 'code', { __ignoreMap: '', className: [`language-${language}`] }, [u('text', code)])])] |
@farnabaz I just tried your solution locally and it doesn't solve Vue's warning. Wouldn't it be just fine to merge this as is ? It could even serve a second purpose by adding a span with the filename to be able to display the filename in the corner of the code block
|
Having filename indeed is a good thing to have, but also some user may not want to have a wrapper tag. Also, I've checked it locally, adding class to |
I'm closing this in favor of #2187. |
#2111
π Linked issue
β Type of change
π Description
π Checklist