mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-16 16:14:43 -04:00
Update CodeMirror to 5.13.5
This commit is contained in:
parent
edc3a31dfd
commit
8bf516263c
84 changed files with 2837 additions and 504 deletions
|
@ -59,7 +59,8 @@ CodeMirror.defineMode("clojure", function (options) {
|
|||
sign: /[+-]/,
|
||||
exponent: /e/i,
|
||||
keyword_char: /[^\s\(\[\;\)\]]/,
|
||||
symbol: /[\w*+!\-\._?:<>\/\xa1-\uffff]/
|
||||
symbol: /[\w*+!\-\._?:<>\/\xa1-\uffff]/,
|
||||
block_indent: /^(?:def|with)[^\/]+$|\/(?:def|with)/
|
||||
};
|
||||
|
||||
function stateStack(indent, type, prev) { // represents a state stack object
|
||||
|
@ -142,7 +143,7 @@ CodeMirror.defineMode("clojure", function (options) {
|
|||
}
|
||||
|
||||
// skip spaces
|
||||
if (stream.eatSpace()) {
|
||||
if (state.mode != "string" && stream.eatSpace()) {
|
||||
return null;
|
||||
}
|
||||
var returnType = null;
|
||||
|
@ -190,7 +191,7 @@ CodeMirror.defineMode("clojure", function (options) {
|
|||
}
|
||||
|
||||
if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) ||
|
||||
/^(?:def|with)/.test(keyWord))) { // indent-word
|
||||
tests.block_indent.test(keyWord))) { // indent-word
|
||||
pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
|
||||
} else { // non-indent word
|
||||
// we continue eating the spaces
|
||||
|
@ -243,5 +244,7 @@ CodeMirror.defineMode("clojure", function (options) {
|
|||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-clojure", "clojure");
|
||||
CodeMirror.defineMIME("text/x-clojurescript", "clojure");
|
||||
CodeMirror.defineMIME("application/edn", "clojure");
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue