MCPcopy Index your code
hub / github.com/fontsource/fontsource / Code

Function Code

website/app/components/code/Code.tsx:168–183  ·  view source on GitHub ↗
({ language, children, ...others }: CodeDirectProps)

Source from the content-addressed store, hash-verified

166}
167
168export const Code = ({ language, children, ...others }: CodeDirectProps) => {
169 if (language === '')
170 return (
171 <MantineCode className={classes['inline-code']} {...others}>
172 {children}
173 </MantineCode>
174 );
175
176 const code = children?.toString() ?? '';
177
178 return (
179 <CodeWrapper language={highlightLanguage(language)} code={code}>
180 <CodeHighlight code={code} language={language} />
181 </CodeWrapper>
182 );
183};

Callers

nothing calls this directly

Calls 2

highlightLanguageFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected