Rehype Plugins for Code
If you want to use a Rehype plugin with Astro to process code blocks (aka code fences), like those in Markdown:
Or like this in HTML:
You may need to use special configuration because Astro (and Starlight) comes with a built-in code highlighter.
Astro
To use it with Astro, you need to disable the built-in syntax highlighting and apply your plugin afterward:
Starlight
Important use Starlight v0.22+ ↗