@astrojs/markdoc@0.6.0
版本发布时间: 2023-10-12 22:46:14
withastro/astro最新发布版本:astro@5.0.0-beta.2(2024-09-24 17:12:05)
Minor Changes
-
#8502
c4270e476
Thanks @bluwy! - Updates the internalshiki
syntax highlighter toshikiji
, an ESM-focused alternative that simplifies bundling and maintenance.There are no new options and no changes to how you author code blocks and syntax highlighting.
Potentially breaking change: While this refactor should be transparent for most projects, the transition to
shikiji
now produces a smaller HTML markup by attaching a fallbackcolor
style to thepre
orcode
element, instead of to the linespan
directly. For example:Before:
<code class="astro-code" style="background-color: #24292e"> <pre> <span class="line" style="color: #e1e4e8">my code</span> </pre> </code>
After:
<code class="astro-code" style="background-color: #24292e; color: #e1e4e8"> <pre> <span class="line">my code<span> </pre> </code>
This does not affect the colors as the
span
will inherit thecolor
from the parent, but if you're relying on a specific HTML markup, please check your site carefully after upgrading to verify the styles.