Update CodeMirror to 5.13.5

This commit is contained in:
Cheng-Han, Wu 2016-04-20 18:11:40 +08:00
parent edc3a31dfd
commit 8bf516263c
84 changed files with 2837 additions and 504 deletions

View file

@ -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");
});