From 4a48b2c2752d84ce9fb0e9fd85b007a6e34bca59 Mon Sep 17 00:00:00 2001 From: 43081j <43081j@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:29:31 +0100 Subject: [PATCH] fix: await highlight result in code component --- packages/astro/components/Code.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/components/Code.astro b/packages/astro/components/Code.astro index 43cc847bb8fa..f0cb26326516 100644 --- a/packages/astro/components/Code.astro +++ b/packages/astro/components/Code.astro @@ -87,7 +87,7 @@ const highlighter = await getCachedHighlighter({ wrap, }); -const html = highlighter.highlight(code, typeof lang === 'string' ? lang : lang.name, { +const html = await highlighter.highlight(code, typeof lang === 'string' ? lang : lang.name, { inline, attributes: rest as any, });