1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-14 22:47:21 +00:00

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
/*
* Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)
@ -16,7 +16,7 @@
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("stex", function() {
CodeMirror.defineMode("stex", function(_config, parserConfig) {
"use strict";
function pushCommand(state, command) {
@ -78,6 +78,14 @@
plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]);
plugins["end"] = addPluginPattern("end", "tag", ["atom"]);
plugins["label" ] = addPluginPattern("label" , "tag", ["atom"]);
plugins["ref" ] = addPluginPattern("ref" , "tag", ["atom"]);
plugins["eqref" ] = addPluginPattern("eqref" , "tag", ["atom"]);
plugins["cite" ] = addPluginPattern("cite" , "tag", ["atom"]);
plugins["bibitem" ] = addPluginPattern("bibitem" , "tag", ["atom"]);
plugins["Bibitem" ] = addPluginPattern("Bibitem" , "tag", ["atom"]);
plugins["RBibitem" ] = addPluginPattern("RBibitem" , "tag", ["atom"]);
plugins["DEFAULT"] = function () {
this.name = "DEFAULT";
this.style = "tag";
@ -117,6 +125,10 @@
setState(state, function(source, state){ return inMathMode(source, state, "\\]"); });
return "keyword";
}
if (source.match("\\(")) {
setState(state, function(source, state){ return inMathMode(source, state, "\\)"); });
return "keyword";
}
if (source.match("$$")) {
setState(state, function(source, state){ return inMathMode(source, state, "$$"); });
return "keyword";
@ -161,7 +173,7 @@
if (source.eatSpace()) {
return null;
}
if (source.match(endModeSeq)) {
if (endModeSeq && source.match(endModeSeq)) {
setState(state, normal);
return "keyword";
}
@ -223,9 +235,10 @@
return {
startState: function() {
var f = parserConfig.inMathMode ? function(source, state){ return inMathMode(source, state); } : normal;
return {
cmdState: [],
f: normal
f: f
};
},
copyState: function(s) {