({
children: code,
className,
})
| 5 | import type { FC, HTMLAttributes } from 'react'; |
| 6 | |
| 7 | const MDXCodeBox: FC<HTMLAttributes<HTMLElement>> = ({ |
| 8 | children: code, |
| 9 | className, |
| 10 | }) => { |
| 11 | const matches = className?.match(/language-(?<language>[a-zA-Z]+)/); |
| 12 | const language = matches?.groups?.language ?? ''; |
| 13 | |
| 14 | return ( |
| 15 | <CodeBox language={getLanguageDisplayName(language)} className={className}> |
| 16 | {code} |
| 17 | </CodeBox> |
| 18 | ); |
| 19 | }; |
| 20 | |
| 21 | export default MDXCodeBox; |
nothing calls this directly
no test coverage detected