Closed sek-consulting closed 5 months ago
I don't know where to look at with your reproduction - backgroundColor
doesn't seems to come from our codebase. Case convention is not the responsibility of Shiki, that you might want to fix that either in your usage or pipeline - unless you can provide a clear reproduction indicates it's a Shiki's issue. Thank you.
Thanks for having a look at the problem.
I stripped down the example even more to really make sure it's not some weird side effect. I removed:
So it's basically just the rehype plugin included in the barebones mdx template from solidstart:
const { default: mdx } = pkg;
export default defineConfig({
ssr: true,
extensions: ["mdx", "md"],
vite: {
plugins: [
mdx.withImports({})({
jsx: true,
jsxImportSource: "solid-js",
providerImportSource: "solid-mdx",
rehypePlugins: [[rehypeShiki, { theme: "github-dark" }]],
}),
],
},
});
export default function App() {
return (
<Router
root={(props) => (
<MDXProvider components={{}}>
<main>
<Suspense>{props.children}</Suspense>
</main>
</MDXProvider>
)}
>
<FileRoutes />
</Router>
);
}
"devDependencies": {
"@shikijs/rehype": "^1.2.3",
"shiki": "^1.2.3"
}
I updated the repo with the code: https://github.com/sek-consulting/solid-shiki1.0
If I can help in any other way please let me know :)
Validations
Describe the bug
Hi :) I'm currently in the process of updating the solid-ui.com docs to the newest solid-start version and I took the opportunity to also update to shiki 1.0. But I found an issue with the style attributes that are getting set on the pre-element.
For background you usually expect
style="background-color:#ff00ff;"
but shiki generatesstyle="backgroundColor:#ff00ff;"
which doesn't set the color.I use the rehype plugin in combination with the vinxi mdx plugin:
versions used:
Reproduction
https://github.com/sek-consulting/solid-shiki1.0
Contributes