Update CodeMirror to version 5.49.0 (#8381)
* Update CodeMirror to version 5.49.0 * Update CodeMirror versions in librejs and VERSIONS
This commit is contained in:
parent
6fa14ac3c8
commit
1e9b330525
352 changed files with 14625 additions and 2451 deletions
|
@ -1,5 +1,5 @@
|
|||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
|
@ -50,7 +50,15 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
|
|||
if (found == stream.pos) {
|
||||
if (!other.parseDelimiters) stream.match(other.open);
|
||||
state.innerActive = other;
|
||||
state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, "") : 0);
|
||||
|
||||
// Get the outer indent, making sure to handle CodeMirror.Pass
|
||||
var outerIndent = 0;
|
||||
if (outer.indent) {
|
||||
var possibleOuterIndent = outer.indent(state.outer, "", "");
|
||||
if (possibleOuterIndent !== CodeMirror.Pass) outerIndent = possibleOuterIndent;
|
||||
}
|
||||
|
||||
state.inner = CodeMirror.startState(other.mode, outerIndent);
|
||||
return other.delimStyle && (other.delimStyle + " " + other.delimStyle + "-open");
|
||||
} else if (found != -1 && found < cutOff) {
|
||||
cutOff = found;
|
||||
|
@ -88,10 +96,10 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
|
|||
}
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
indent: function(state, textAfter, line) {
|
||||
var mode = state.innerActive ? state.innerActive.mode : outer;
|
||||
if (!mode.indent) return CodeMirror.Pass;
|
||||
return mode.indent(state.innerActive ? state.inner : state.outer, textAfter);
|
||||
return mode.indent(state.innerActive ? state.inner : state.outer, textAfter, line);
|
||||
},
|
||||
|
||||
blankLine: function(state) {
|
||||
|
@ -104,7 +112,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
|
|||
var other = others[i];
|
||||
if (other.open === "\n") {
|
||||
state.innerActive = other;
|
||||
state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "") : 0);
|
||||
state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "", "") : 0);
|
||||
}
|
||||
}
|
||||
} else if (state.innerActive.close === "\n") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue