MCPcopy Create free account
hub / github.com/TruthHun/BookStack / getMode

Function getMode

static/editor.md/lib/codemirror/mode/markdown/markdown.js:19–26  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

17 var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: "xml", htmlMode: true} : "text/plain");
18
19 function getMode(name) {
20 if (CodeMirror.findModeByName) {
21 var found = CodeMirror.findModeByName(name);
22 if (found) name = found.mime || found.mimes[0];
23 }
24 var mode = CodeMirror.getMode(cmCfg, name);
25 return mode.name == "null" ? null : mode;
26 }
27
28 // Should characters that affect highlighting be highlighted separate?
29 // Does not include characters that will be output (such as `1.` and `-` for lists)

Callers 1

blockNormalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected