UNPKG

fumadocs-core

Version:

The React.js library for building a documentation website

23 lines (22 loc) • 790 B
import { t as createShikiFactory } from "../../shiki-DL5DIaX-.js"; // src/highlight/shiki/full.ts const defaultShikiFactory = createShikiFactory({ async init(options) { const { createHighlighter, createJavaScriptRegexEngine } = await import("shiki"); return createHighlighter({ langs: [], themes: [], langAlias: options?.langAlias, engine: createJavaScriptRegexEngine() }); } }); /** factory using the WASM powered Regex engine */ const wasmShikiFactory = createShikiFactory({ async init(options) { const { createHighlighter, createOnigurumaEngine } = await import("shiki"); return createHighlighter({ langs: [], themes: [], langAlias: options?.langAlias, engine: createOnigurumaEngine(import("shiki/wasm")) }); } }); export { defaultShikiFactory, wasmShikiFactory };