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

Function highlightLanguage

website/app/components/code/highlight.ts:34–38  ·  view source on GitHub ↗
(language: string)

Source from the content-addressed store, hash-verified

32 languageLabels[language] ?? language;
33
34export const highlightLanguage = (language: string) => {
35 const normalized = language.trim().toLowerCase();
36
37 return languageAliases[normalized] ?? normalized;
38};
39
40const highlighter = createHighlighterCoreSync({
41 engine: createJavaScriptRegexEngine(),

Callers 5

CodeHighlightFunction · 0.90
CodePreFunction · 0.90
CodeMdxFunction · 0.90
CodeFunction · 0.90
highlight.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected