You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The builtin component Code.astro doesn't set .astro-code css class to the rendered pre as it did before.
Starting from shiki v0.12, a new feature reported here shikijs/shiki#376 adds the theme name as css class. Even if the author added it as optional, in the end it's forced, see shikijs/shiki#376 (comment)
This causes the bug, as the replace logic of Code.astro doens't work anymore. This bug happens when astro build.
Important
Actually because the shiki version is pinned to v0.11, this bug doens't occur. When updated to v0.12, the bug will happen. The PR I submitted, just resolves this issue. It's retro compatible with the v0.11 so it can be merged nonetheless.
What version of
astro
are you using?1.9.1
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Windows
Describe the Bug
The builtin component
Code.astro
doesn't set.astro-code
css class to the renderedpre
as it did before.Starting from shiki v0.12, a new feature reported here shikijs/shiki#376 adds the theme name as css class. Even if the author added it as optional, in the end it's forced, see shikijs/shiki#376 (comment)
This causes the bug, as the replace logic of
Code.astro
doens't work anymore. This bug happens whenastro build
.Important
Actually because the shiki version is pinned to v0.11, this bug doens't occur. When updated to v0.12, the bug will happen. The PR I submitted, just resolves this issue. It's retro compatible with the v0.11 so it can be merged nonetheless.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-hwrkkq?file=src%2Fpages%2Findex.astro,package.json&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: