Skip to content

Commit 4f77b4f

Browse files
authored
fix(types): support preload built-in shiki languages as string (#4513)
1 parent b88ae8d commit 4f77b4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node/markdown/markdown.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import MarkdownIt from 'markdown-it'
2424
import anchorPlugin from 'markdown-it-anchor'
2525
import attrsPlugin from 'markdown-it-attrs'
2626
import { full as emojiPlugin } from 'markdown-it-emoji'
27-
import type { BuiltinTheme, Highlighter } from 'shiki'
27+
import type { BuiltinLanguage, BuiltinTheme, Highlighter } from 'shiki'
2828
import type { Logger } from 'vite'
2929
import { containerPlugin, type ContainerOptions } from './plugins/containers'
3030
import { gitHubAlertsPlugin } from './plugins/githubAlerts'
@@ -81,10 +81,10 @@ export interface MarkdownOptions extends Options {
8181
*/
8282
theme?: ThemeOptions
8383
/**
84-
* Languages for syntax highlighting.
84+
* Custom languages for syntax highlighting or pre-load built-in languages.
8585
* @see https://shiki.style/languages
8686
*/
87-
languages?: LanguageInput[]
87+
languages?: (LanguageInput | BuiltinLanguage)[]
8888
/**
8989
* Custom language aliases.
9090
*

0 commit comments

Comments
 (0)