MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getHighlighter

Function getHighlighter

web/lib/workers/highlight.worker.ts:26–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24let highlighterPromise: Promise<Highlighter> | null = null;
25
26function getHighlighter(): Promise<Highlighter> {
27 if (!highlighterPromise) {
28 highlighterPromise = import("shiki").then(({ createHighlighter }) =>
29 createHighlighter({
30 themes: ["github-dark", "github-light"],
31 langs: [
32 "typescript",
33 "javascript",
34 "tsx",
35 "jsx",
36 "python",
37 "bash",
38 "shell",
39 "json",
40 "yaml",
41 "markdown",
42 "css",
43 "html",
44 "rust",
45 "go",
46 "java",
47 "c",
48 "cpp",
49 "sql",
50 "dockerfile",
51 ],
52 })
53 );
54 }
55 return highlighterPromise;
56}
57
58async function highlight(msg: InMessage): Promise<OutMessage> {
59 const highlighter = await getHighlighter();

Callers 1

highlightFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected