Skip to content

Commit b7c7368

Browse files
committed
fixup!
1 parent 49c54b1 commit b7c7368

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/rehype-shiki/src/plugin.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ function isCodeBlock(node) {
5656
/**
5757
* @param {import('./index.mjs').HighlighterOptions & { highlighter: import('./highlighter.mjs').SyntaxHighlighter }} options
5858
*/
59-
export default ({ highlighter, ...options }) =>
60-
async tree => {
61-
highlighter ??= await createHighlighter(options);
59+
export default async function rehypeShikiji({ highlighter, ...options }) {
60+
highlighter ??= await createHighlighter(options);
6261

62+
return function (tree) {
6363
visit(tree, 'element', (_, index, parent) => {
6464
const languages = [];
6565
const displayNames = [];
@@ -193,3 +193,4 @@ export default ({ highlighter, ...options }) =>
193193
parent.children.splice(index, 1, ...children);
194194
});
195195
};
196+
}

0 commit comments

Comments
 (0)