| 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) |