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

Function SyntaxHighlight

web/components/tools/SyntaxHighlight.tsx:138–161  ·  view source on GitHub ↗
({
  code,
  lang,
  theme = "github-dark",
  className,
}: SyntaxHighlightProps)

Source from the content-addressed store, hash-verified

136}
137
138export function SyntaxHighlight({
139 code,
140 lang,
141 theme = "github-dark",
142 className,
143}: SyntaxHighlightProps) {
144 const html = useHighlightedCode({ code, lang, theme });
145
146 if (html) {
147 return (
148 <div
149 className={className}
150 // shiki wraps output in <pre><code> already
151 dangerouslySetInnerHTML={{ __html: html }}
152 />
153 );
154 }
155
156 return (
157 <pre className={className}>
158 <code>{code}</code>
159 </pre>
160 );
161}

Callers

nothing calls this directly

Calls 1

useHighlightedCodeFunction · 0.85

Tested by

no test coverage detected