We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e44f080 commit 2faca0bCopy full SHA for 2faca0b
1 file changed
src/utils/highlighter.mjs
@@ -1,7 +1,7 @@
1
'use strict';
2
3
import { createHighlighterCoreSync } from '@shikijs/core';
4
-import { createJavaScriptRegexEngine } from '@shikijs/engine-javascript';
+import { createOnigurumaEngine } from '@shikijs/engine-oniguruma';
5
import { toString } from 'hast-util-to-string';
6
import { h as createElement } from 'hastscript';
7
import { SKIP, visit } from 'unist-util-visit';
@@ -15,7 +15,7 @@ const languagePrefix = 'language-';
15
// Creates a Singleton instance for Shiki's syntax highlighter using WASM
16
const shikiHighlighter = createHighlighterCoreSync({
17
...shikiConfig,
18
- engine: createJavaScriptRegexEngine(),
+ engine: await createOnigurumaEngine(import('shiki/wasm')),
19
});
20
21
// Creates a static button element which is used for the "copy" button
0 commit comments