We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba5ff86 commit 33ce7e4Copy full SHA for 33ce7e4
src/node/markdown/plugins/highlight.ts
@@ -55,7 +55,7 @@ const attrsToLines = (attrs: string): TransformerCompactLineOption[] => {
55
56
export async function highlight(
57
theme: ThemeOptions,
58
- languages?: LanguageInput[],
+ languages: LanguageInput[] = [],
59
defaultLang: string = '',
60
logger: Pick<Logger, 'warn'> = console,
61
userTransformers: ShikijiTransformer[] = [],
@@ -66,7 +66,7 @@ export async function highlight(
66
typeof theme === 'string' || 'name' in theme
67
? [theme]
68
: [theme.light, theme.dark],
69
- langs: languages?.length ? languages : Object.keys(bundledLanguages),
+ langs: [...Object.keys(bundledLanguages), ...languages],
70
langAlias: languageAlias
71
})
72
0 commit comments