({ node, className, children, ...props })
| 118 | remarkPlugins={[remarkGfm]} |
| 119 | components={{ |
| 120 | pre({ node, className, children, ...props }) { |
| 121 | const child = children[0] as ReactElement; |
| 122 | const match = /language-(\w+)/.exec(child.props.className || ""); |
| 123 | const language = match ? match[1] : "SQL"; |
| 124 | return ( |
| 125 | <pre className={`${className || ""} w-full p-0 my-1`} {...props}> |
| 126 | <CodeBlock |
| 127 | key={Math.random()} |
| 128 | messageId={message.id} |
| 129 | language={language || "SQL"} |
| 130 | value={String(child.props.children).replace(/\n$/, "")} |
| 131 | {...props} |
| 132 | /> |
| 133 | </pre> |
| 134 | ); |
| 135 | }, |
| 136 | code({ children }) { |
| 137 | return <code className="px-0">{children}</code>; |
| 138 | }, |
nothing calls this directly
no outgoing calls
no test coverage detected