import shiki from 'shiki'; import { visit } from 'unist-util-visit'; const remarkShiki = async (theme: shiki.Theme) => { const highlighter = await shiki.getHighlighter({ theme }); return () => (tree: any) => { visit(tree, 'code', (node) => { let html = highlighter.codeToHtml(node.value, { lang: node.lang ?? 'plaintext' }); // Replace "shiki" class naming with "astro". html = html.replace('