({children, lang}: {children: string; lang: string})
| 175 | } |
| 176 | |
| 177 | export function CodeBlockBase({children, lang}: {children: string; lang: string}) { |
| 178 | // @ts-ignore |
| 179 | let highlighted = highlight(children, Language[lang.toUpperCase()]); |
| 180 | return ( |
| 181 | <pre className="m-0"> |
| 182 | <code |
| 183 | className="source" |
| 184 | style={{fontFamily: 'inherit', WebkitTextSizeAdjust: 'none'}} |
| 185 | dangerouslySetInnerHTML={{__html: highlighted}} |
| 186 | /> |
| 187 | </pre> |
| 188 | ); |
| 189 | } |
| 190 | |
| 191 | interface TruncatedCodeProps extends ICodeProps { |
| 192 | children: string; |
nothing calls this directly
no test coverage detected