From 3ab7f66916c649d4cd191632273a9daa98dc8ad2 Mon Sep 17 00:00:00 2001 From: Alex Guja <60717961+alexguja@users.noreply.github.com> Date: Sat, 21 Dec 2024 15:48:05 +0100 Subject: [PATCH 1/2] Fix import Update import in the example docs --- docs/packages/next.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/packages/next.md b/docs/packages/next.md index 0de6def7..236a3493 100644 --- a/docs/packages/next.md +++ b/docs/packages/next.md @@ -54,7 +54,7 @@ import type { BundledLanguage } from 'shiki' import { toJsxRuntime } from 'hast-util-to-jsx-runtime' import { Fragment } from 'react' import { jsx, jsxs } from 'react/jsx-runtime' -import { codeToHast } from 'shiki' +import { codeToHtml } from 'shiki' export default function Page() { return ( From 78307275aa26a75da6b8bd1f1bb7baba74c6da37 Mon Sep 17 00:00:00 2001 From: Alex Guja <60717961+alexguja@users.noreply.github.com> Date: Sat, 21 Dec 2024 19:39:50 +0100 Subject: [PATCH 2/2] update docs --- docs/packages/next.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/packages/next.md b/docs/packages/next.md index 236a3493..df607db0 100644 --- a/docs/packages/next.md +++ b/docs/packages/next.md @@ -54,7 +54,7 @@ import type { BundledLanguage } from 'shiki' import { toJsxRuntime } from 'hast-util-to-jsx-runtime' import { Fragment } from 'react' import { jsx, jsxs } from 'react/jsx-runtime' -import { codeToHtml } from 'shiki' +import { codeToHast } from 'shiki' export default function Page() { return ( @@ -75,7 +75,7 @@ interface Props { } async function CodeBlock(props: Props) { - const out = await codeToHtml(props.children, { + const out = await codeToHast(props.children, { lang: props.lang, theme: 'github-dark' })