(props: CodeProps)
| 147 | }; |
| 148 | |
| 149 | export const CodeMdx = (props: CodeProps) => { |
| 150 | const language = getLanguageFromClassName(props.className); |
| 151 | |
| 152 | if (language === '') |
| 153 | return <MantineCode className={classes['inline-code']} {...props} />; |
| 154 | |
| 155 | const code = props.children?.toString().trim() ?? ''; |
| 156 | |
| 157 | return ( |
| 158 | <CodeWrapper language={highlightLanguage(language)} code={code}> |
| 159 | <CodeHighlight code={code} language={language} /> |
| 160 | </CodeWrapper> |
| 161 | ); |
| 162 | }; |
| 163 | |
| 164 | interface CodeDirectProps extends CodeProps { |
| 165 | language: string; |
nothing calls this directly
no test coverage detected