MCPcopy
hub / github.com/code-hike/codehike / Code

Function Code

apps/web/components/code.tsx:38–52  ·  view source on GitHub ↗
({
  codeblock,
  ...rest
}: {
  codeblock: RawCode
  className?: string
  style?: React.CSSProperties
  extraHandlers?: AnnotationHandler[]
})

Source from the content-addressed store, hash-verified

36}
37
38export async function Code({
39 codeblock,
40 ...rest
41}: {
42 codeblock: RawCode
43 className?: string
44 style?: React.CSSProperties
45 extraHandlers?: AnnotationHandler[]
46}) {
47 const { flags } = extractFlags(codeblock)
48 const highlighted = await highlight(codeblock, theme, {
49 annotationPrefix: flags.includes("p") ? "!!" : undefined,
50 })
51 return <HighCode highlighted={highlighted} {...rest} />
52}
53
54export function HighCode({
55 highlighted,

Callers

nothing calls this directly

Calls 2

highlightFunction · 0.90
extractFlagsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…