Skip to content

Commit

Permalink
fix: await highlight result in code component
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j committed Apr 1, 2024
1 parent 5e9b258 commit 4a48b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/components/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit 4a48b2c

Please sign in to comment.