MCPcopy Create free account
hub / github.com/EyuCoder/chatgpt-pro / code

Function code

src/components/Markdown.jsx:10–25  ·  view source on GitHub ↗
({ inline, className, children, ...props })

Source from the content-addressed store, hash-verified

8 <ReactMarkdown
9 components={{
10 code({ inline, className, children, ...props }) {
11 const match = /language-(\w+)/.exec(className || 'language-js');
12 return !inline ? (
13 <SyntaxHighlighter
14 {...props}
15 style={atomDark}
16 language={match[1]}
17 PreTag='div'>
18 {String(children).replace(/\n$/, '')}
19 </SyntaxHighlighter>
20 ) : (
21 <code {...props} className={className}>
22 {children}
23 </code>
24 );
25 },
26 }}>
27 {markdownText}
28 </ReactMarkdown>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected