MCPcopy
hub / github.com/21st-dev/1code / highlight

Function highlight

src/renderer/components/chat-markdown-renderer.tsx:67–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65 let cancelled = false
66
67 const highlight = async () => {
68 try {
69 const html = await highlightCode(children, language, themeId)
70 if (!cancelled) {
71 setHighlightedHtml(html)
72 }
73 } catch (error) {
74 console.error("Failed to highlight code:", error)
75 }
76 }
77
78 highlight()
79

Callers 1

CodeBlockFunction · 0.85

Calls 1

highlightCodeFunction · 0.90

Tested by

no test coverage detected