MCPcopy Create free account
hub / github.com/cweijan/vscode-office / getCodeLanguageName

Function getCodeLanguageName

vditor/src/ts/codeBlock/codeMirrorManager.ts:215–218  ·  view source on GitHub ↗
(codeElement: HTMLElement)

Source from the content-addressed store, hash-verified

213export const isInsideWysiwygCodeMirror = isInsideCodeMirror;
214
215export const getCodeLanguageName = (codeElement: HTMLElement) => {
216 const match = codeElement.className.match(/language-([^\s]+)/);
217 return match ? match[1] : "";
218};
219
220/** @deprecated use getCodeLanguageName */
221const getLanguageName = getCodeLanguageName;

Callers 6

getChromeCurrentLanguageFunction · 0.90
ensureCodeBlockChromeFunction · 0.90
resolveLanguageFromCmDomFunction · 0.85
resolveCmBlockLanguageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected