MCPcopy Create free account
hub / github.com/ScrapeGraphAI/scrapecraft / code

Function code

frontend/src/components/Chat/StreamingMessage.tsx:62–81  ·  view source on GitHub ↗
({className, children, ...props}: any)

Source from the content-addressed store, hash-verified

60 remarkPlugins={[remarkGfm]}
61 components={{
62 code({className, children, ...props}: any) {
63 const match = /language-(\w+)/.exec(className || '');
64 const isInline = !match;
65
66 if (!isInline && match) {
67 return (
68 <pre className="bg-code-bg text-code-text p-4 rounded-md overflow-x-auto my-2">
69 <code className={className} {...props}>
70 {children}
71 </code>
72 </pre>
73 );
74 }
75
76 return (
77 <code className="text-accent bg-code-bg px-1 py-0.5 rounded text-sm" {...props}>
78 {children}
79 </code>
80 );
81 }
82 }}
83 >
84 {displayedContent}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected