1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-04 13:05:23 +02:00

Update CodeMirror dep to v5.42.2

Affects Code and Markdown section types
This commit is contained in:
Harvey Kandola 2019-01-08 14:48:23 +00:00
parent c706edec47
commit 479a61a3ef
347 changed files with 21845 additions and 20770 deletions

View file

@ -9,7 +9,7 @@
<script src="stex.js"></script>
<style>.CodeMirror {background: #f8f8f8;}</style>
<div id=nav>
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<ul>
<li><a href="../../index.html">Home</a>
@ -103,6 +103,12 @@
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
</script>
<p>sTeX mode supports this option:</p>
<d1>
<dt><code>inMathMode: boolean</code></dt>
<dd>Whether to start parsing in math mode (default: <code>false</code>).</dd>
</d1>
<p><strong>MIME types defined:</strong> <code>text/x-stex</code>.</p>
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#stex_*">normal</a>, <a href="../../test/index.html#verbose,stex_*">verbose</a>.</p>

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) {
@ -173,7 +173,7 @@
if (source.eatSpace()) {
return null;
}
if (source.match(endModeSeq)) {
if (endModeSeq && source.match(endModeSeq)) {
setState(state, normal);
return "keyword";
}
@ -235,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) {

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() {
var mode = CodeMirror.getMode({tabSize: 4}, "stex");