From eaa8ccaccb1091820d0a8d1223996a6dd057347d Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sun, 17 Jan 2016 14:28:04 -0600 Subject: Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor --- public/vendor/codemirror/mode/ruby/index.html | 0 public/vendor/codemirror/mode/ruby/ruby.js | 6 +++--- public/vendor/codemirror/mode/ruby/test.js | 0 3 files changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 public/vendor/codemirror/mode/ruby/index.html mode change 100755 => 100644 public/vendor/codemirror/mode/ruby/ruby.js mode change 100755 => 100644 public/vendor/codemirror/mode/ruby/test.js (limited to 'public/vendor/codemirror/mode/ruby') diff --git a/public/vendor/codemirror/mode/ruby/index.html b/public/vendor/codemirror/mode/ruby/index.html old mode 100755 new mode 100644 diff --git a/public/vendor/codemirror/mode/ruby/ruby.js b/public/vendor/codemirror/mode/ruby/ruby.js old mode 100755 new mode 100644 index eab9d9da..10cad8d9 --- a/public/vendor/codemirror/mode/ruby/ruby.js +++ b/public/vendor/codemirror/mode/ruby/ruby.js @@ -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: "#" }; }); diff --git a/public/vendor/codemirror/mode/ruby/test.js b/public/vendor/codemirror/mode/ruby/test.js old mode 100755 new mode 100644 -- cgit v1.2.3