File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11import type { HighlightOptions , ShikiHighlighter , ShikiOptions } from './types'
22import { unwrapTransformer } from './transforms'
3- import { createOnigurumaEngine } from 'shiki/engine/oniguruma '
3+ import { createJavaScriptRegexEngine } from 'shiki/engine/javascript '
44
55const _importShikiCore = cached ( ( ) => import ( 'shiki/core' ) )
6- const _importWasm = cached ( ( ) => import ( 'shiki/wasm' ) )
76
87export const createHighlighter = cached < ShikiHighlighter > (
98 async ( _shikiOptions : MaybePromise < ShikiOptions > ) => {
10- const [ { createHighlighterCore } , wasm , shikiOptions ] = await Promise . all ( [
9+ const [ { createHighlighterCore } , shikiOptions ] = await Promise . all ( [
1110 _importShikiCore ( ) ,
12- createOnigurumaEngine ( _importWasm ( ) ) ,
1311 _shikiOptions ,
1412 ] )
1513
1614 const highlighter = ( await createHighlighterCore ( {
1715 ...shikiOptions . core ,
18- engine : wasm ,
16+ engine : createJavaScriptRegexEngine ( ) ,
1917 } ) ) as ShikiHighlighter
2018
2119 highlighter . highlight = (
You can’t perform that action at this time.
0 commit comments