mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Fix: Update Shiki import from getHighlighter to createHighlighter for v3.4.2 compatibility
- Shiki library API changed in version 3.4.2 - getHighlighter() function was deprecated and replaced with createHighlighter() - Updated import statement and function call in DiffView.tsx - Resolves build errors and maintains syntax highlighting functionality
This commit is contained in:
parent
efdbda1139
commit
d1426206cc
@ -4,7 +4,7 @@ import { workbenchStore } from '~/lib/stores/workbench';
|
||||
import type { FileMap } from '~/lib/stores/files';
|
||||
import type { EditorDocument } from '~/components/editor/codemirror/CodeMirrorEditor';
|
||||
import { diffLines, type Change } from 'diff';
|
||||
import { getHighlighter } from 'shiki';
|
||||
import { createHighlighter } from 'shiki';
|
||||
import '~/styles/diff-view.css';
|
||||
import { diffFiles, extractRelativePath } from '~/utils/diff';
|
||||
import { ActionRunner } from '~/lib/runtime/action-runner';
|
||||
@ -555,7 +555,7 @@ const getSharedHighlighter = async () => {
|
||||
return highlighterPromise;
|
||||
}
|
||||
|
||||
highlighterPromise = getHighlighter({
|
||||
highlighterPromise = createHighlighter({
|
||||
themes: ['github-dark', 'github-light'],
|
||||
langs: [
|
||||
'typescript',
|
||||
|
Loading…
Reference in New Issue
Block a user