Skip to content

Commit

Permalink
fix: allow loading multiple langs at once
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 11, 2023
1 parent 7e3f0a5 commit a5c8e59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export async function getHighlighterCore(options: HighlighterCoreOptions) {
}

async function loadLanguage(...langs: LanguageInput[]) {
await Promise.all(
langs.map(async lang =>
registry.loadLanguage(await normalizeGetter(lang)),
await registry.loadLanguages(
await Promise.all(
langs.map(async lang => await normalizeGetter(lang)),
),
)
}
Expand Down

0 comments on commit a5c8e59

Please sign in to comment.