Skip to content

Commit dcabc2b

Browse files
committed
fixup!
1 parent 4688ade commit dcabc2b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/rehype-shiki/src/index.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ import createHighlighter, { getLanguageByName } from './highlighter.mjs';
3030
*/
3131
async function getEngine({ wasm = false }) {
3232
if (wasm) {
33-
const { createJavaScriptRegexEngine } = await import(
34-
'@shikijs/engine-javascript'
33+
const { createOnigurumaEngine } = await import('@shikijs/engine-oniguruma');
34+
return createOnigurumaEngine(
35+
typeof wasm === 'boolean' ? await import('shiki/wasm') : wasm
3536
);
36-
return createJavaScriptRegexEngine();
3737
}
3838

39-
const { createOnigurumaEngine } = await import('@shikijs/engine-oniguruma');
40-
return createOnigurumaEngine(
41-
typeof wasm === 'boolean' ? await import('shiki/wasm') : wasm
39+
const { createJavaScriptRegexEngine } = await import(
40+
'@shikijs/engine-javascript'
4241
);
42+
return createJavaScriptRegexEngine();
4343
}
4444

4545
/**

packages/rehype-shiki/src/transformers/twoslash/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ export const twoslash = options =>
4444
},
4545
},
4646
throws: false,
47-
...(typeof options === 'object' ? twoslash : {}),
47+
...(typeof options === 'object' ? options : {}),
4848
});

0 commit comments

Comments
 (0)