Skip to content

Commit

Permalink
fix: merge bundledLanguages with user provided languages for less bre…
Browse files Browse the repository at this point in the history
…akage
  • Loading branch information
brc-dd committed Nov 23, 2023
1 parent ba5ff86 commit 33ce7e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node/markdown/plugins/highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const attrsToLines = (attrs: string): TransformerCompactLineOption[] => {

export async function highlight(
theme: ThemeOptions,
languages?: LanguageInput[],
languages: LanguageInput[] = [],
defaultLang: string = '',
logger: Pick<Logger, 'warn'> = console,
userTransformers: ShikijiTransformer[] = [],
Expand All @@ -66,7 +66,7 @@ export async function highlight(
typeof theme === 'string' || 'name' in theme
? [theme]
: [theme.light, theme.dark],
langs: languages?.length ? languages : Object.keys(bundledLanguages),
langs: [...Object.keys(bundledLanguages), ...languages],
langAlias: languageAlias
})

Expand Down

0 comments on commit 33ce7e4

Please sign in to comment.