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:
oscar.lofwenhamn 2019-10-15 10:40:42 +02:00 committed by Lauris BH
parent 6fa14ac3c8
commit 1e9b330525
352 changed files with 14625 additions and 2451 deletions

View file

@ -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
@ -151,7 +151,7 @@
};
CodeMirror.defineMode("php", function(config, parserConfig) {
var htmlMode = CodeMirror.getMode(config, "text/html");
var htmlMode = CodeMirror.getMode(config, (parserConfig && parserConfig.htmlMode) || "text/html");
var phpMode = CodeMirror.getMode(config, phpConfig);
function dispatch(stream, state) {
@ -160,7 +160,7 @@
if (!isPHP) {
if (stream.match(/^<\?\w*/)) {
state.curMode = phpMode;
if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, ""))
if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, "", ""))
state.curState = state.php;
return "meta";
}
@ -213,11 +213,11 @@
token: dispatch,
indent: function(state, textAfter) {
indent: function(state, textAfter, line) {
if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
(state.curMode == phpMode && /^\?>/.test(textAfter)))
return htmlMode.indent(state.html, textAfter);
return state.curMode.indent(state.curState, textAfter);
return htmlMode.indent(state.html, textAfter, line);
return state.curMode.indent(state.curState, textAfter, line);
},
blockCommentStart: "/*",