({ node, inline, className, children, ...props }: any)
| 163 | rehypePlugins={[rehypeRaw, rehypeKatex]} |
| 164 | components={{ |
| 165 | code({ node, inline, className, children, ...props }: any) { |
| 166 | const match = /language-(\w+)/.exec(className || ''); |
| 167 | return !inline && match ? ( |
| 168 | <SyntaxHighlighter |
| 169 | style={dracula} |
| 170 | language={match[1]} |
| 171 | PreTag="div" |
| 172 | customStyle={{ |
| 173 | margin: '0.5rem 0', |
| 174 | borderRadius: '0.375rem', |
| 175 | fontSize: '0.75rem', |
| 176 | }} |
| 177 | {...props} |
| 178 | > |
| 179 | {String(children).replace(/\n$/, '')} |
| 180 | </SyntaxHighlighter> |
| 181 | ) : ( |
| 182 | <code className="bg-gray-100 text-gray-800 px-1 py-0.5 rounded text-xs" {...props}> |
| 183 | {children} |
| 184 | </code> |
| 185 | ); |
| 186 | }, |
| 187 | table({ children }) { |
| 188 | return ( |
| 189 | <div className="overflow-x-auto my-2"> |
nothing calls this directly
no outgoing calls
no test coverage detected