(code, lang)
| 380 | return marked.use( |
| 381 | markedShiki({ |
| 382 | async highlight(code, lang) { |
| 383 | const highlighter = await getSharedHighlighter({ themes: ["Arctic"], langs: [] }) |
| 384 | if (!(lang in bundledLanguages)) { |
| 385 | lang = "text" |
| 386 | } |
| 387 | if (!highlighter.getLoadedLanguages().includes(lang)) { |
| 388 | await highlighter.loadLanguage(lang as BundledLanguage) |
| 389 | } |
| 390 | return highlighter.codeToHtml(code, { |
| 391 | lang: lang || "text", |
| 392 | theme: "Arctic", |
| 393 | tabindex: false, |
| 394 | }) |
| 395 | }, |
| 396 | }), |
| 397 | ) |
| 398 | }, |