mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 06:31:49 +00:00
Core: Fix build error without JS engine
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-core': patch
|
||||
---
|
||||
|
||||
Fix build error without JS engine
|
||||
@@ -9,6 +9,7 @@ import type { Processor, Transformer } from 'unified';
|
||||
import {
|
||||
getSingletonHighlighter,
|
||||
createJavaScriptRegexEngine,
|
||||
createWasmOnigEngine,
|
||||
type ShikiTransformer,
|
||||
bundledLanguages,
|
||||
type BuiltinTheme,
|
||||
@@ -159,7 +160,7 @@ export function rehypeCode(
|
||||
const highlighter = getSingletonHighlighter({
|
||||
engine: codeOptions.experimentalJSEngine
|
||||
? createJavaScriptRegexEngine()
|
||||
: undefined,
|
||||
: createWasmOnigEngine(),
|
||||
themes: themeItems.filter(Boolean) as BuiltinTheme[],
|
||||
langs: codeOptions.langs ?? Object.keys(bundledLanguages),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user