({ inline, className, children, ...props })
| 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> |
nothing calls this directly
no outgoing calls
no test coverage detected