MCPcopy
hub / github.com/pandao/editor.md / createMode

Function createMode

lib/codemirror/mode/slim/slim.js:298–309  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

296 }
297
298 function createMode(mode) {
299 var query = embedded[mode];
300 var spec = CodeMirror.mimeModes[query];
301 if (spec) {
302 return CodeMirror.getMode(config, spec);
303 }
304 var factory = CodeMirror.modes[query];
305 if (factory) {
306 return factory(config, {name: query});
307 }
308 return CodeMirror.getMode(config, "null");
309 }
310
311 function getMode(mode) {
312 if (!modes.hasOwnProperty(mode)) {

Callers 1

getModeFunction · 0.85

Calls 1

factoryFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…