Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor

This commit is contained in:
Wu Cheng-Han 2016-01-17 14:28:04 -06:00
parent ce65e58096
commit eaa8ccaccb
381 changed files with 6726 additions and 2636 deletions

6
public/vendor/codemirror/mode/ruby/ruby.js vendored Executable file → Normal file
View file

@ -25,7 +25,7 @@ CodeMirror.defineMode("ruby", function(config) {
"caller", "lambda", "proc", "public", "protected", "private", "require", "load",
"require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__"
]);
var indentWords = wordObj(["def", "class", "case", "for", "while", "module", "then",
var indentWords = wordObj(["def", "class", "case", "for", "while", "until", "module", "then",
"catch", "loop", "proc", "begin"]);
var dedentWords = wordObj(["end", "until"]);
var matching = {"[": "]", "{": "}", "(": ")"};
@ -37,7 +37,6 @@ CodeMirror.defineMode("ruby", function(config) {
}
function tokenBase(stream, state) {
curPunc = null;
if (stream.sol() && stream.match("=begin") && stream.eol()) {
state.tokenize.push(readBlockComment);
return "comment";
@ -232,6 +231,7 @@ CodeMirror.defineMode("ruby", function(config) {
},
token: function(stream, state) {
curPunc = null;
if (stream.sol()) state.indented = stream.indentation();
var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype;
var thisTok = curPunc;
@ -275,7 +275,7 @@ CodeMirror.defineMode("ruby", function(config) {
(state.continuedLine ? config.indentUnit : 0);
},
electricChars: "}de", // enD and rescuE
electricInput: /^\s*(?:end|rescue|\})$/,
lineComment: "#"
};
});