chore: replace deprecated code (#4057)

pull/4063/head
Chris 4 months ago committed by GitHub
parent 2bc0d39d50
commit 256d742b73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,7 +1,7 @@
import { customAlphabet } from 'nanoid'
import c from 'picocolors'
import type { ShikiTransformer } from 'shiki'
import { bundledLanguages, getHighlighter, isSpecialLang } from 'shiki'
import { bundledLanguages, createHighlighter, isSpecialLang } from 'shiki'
import {
transformerCompactLineOptions,
transformerNotationDiff,
@ -57,7 +57,7 @@ export async function highlight(
codeTransformers: userTransformers = []
} = options
const highlighter = await getHighlighter({
const highlighter = await createHighlighter({
themes:
typeof theme === 'object' && 'light' in theme && 'dark' in theme
? [theme.light, theme.dark]

Loading…
Cancel
Save