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

Function code

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

Source from the content-addressed store, hash-verified

49 remarkPlugins={[remarkGfm]}
50 components={{
51 code({className, children, ...props}: any) {
52 const match = /language-(\w+)/.exec(className || '');
53 const isInline = !match;
54
55 if (!isInline && match) {
56 return (
57 <pre className="bg-code-bg text-code-text p-4 rounded-md overflow-x-auto">
58 <code className={className} {...props}>
59 {children}
60 </code>
61 </pre>
62 );
63 }
64
65 return (
66 <code className="text-accent bg-code-bg px-1 py-0.5 rounded text-sm" {...props}>
67 {children}
68 </code>
69 );
70 }
71 }}
72 >
73 {message.content}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected