MCPcopy Create free account
hub / github.com/arctic-cli/interface / highlight

Function highlight

packages/ui/src/context/marked.tsx:382–395  ·  view source on GitHub ↗
(code, lang)

Source from the content-addressed store, hash-verified

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 },

Callers 1

PromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected