This commit is contained in:
2020-02-26 21:59:06 +03:00
parent 21937bbed7
commit 023e108c2e
96 changed files with 11023 additions and 10173 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
@@ -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: "/*",