fix(types): support preload built-in shiki languages as string (#4513)

pull/4509/merge
Anthony Fu 8 months ago committed by GitHub
parent b88ae8d4a1
commit 4f77b4fdfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,7 +24,7 @@ import MarkdownIt from 'markdown-it'
import anchorPlugin from 'markdown-it-anchor'
import attrsPlugin from 'markdown-it-attrs'
import { full as emojiPlugin } from 'markdown-it-emoji'
import type { BuiltinTheme, Highlighter } from 'shiki'
import type { BuiltinLanguage, BuiltinTheme, Highlighter } from 'shiki'
import type { Logger } from 'vite'
import { containerPlugin, type ContainerOptions } from './plugins/containers'
import { gitHubAlertsPlugin } from './plugins/githubAlerts'
@ -81,10 +81,10 @@ export interface MarkdownOptions extends Options {
*/
theme?: ThemeOptions
/**
* Languages for syntax highlighting.
* Custom languages for syntax highlighting or pre-load built-in languages.
* @see https://shiki.style/languages
*/
languages?: LanguageInput[]
languages?: (LanguageInput | BuiltinLanguage)[]
/**
* Custom language aliases.
*

Loading…
Cancel
Save