From f7f8c901f4bc39c3ed0a2bdfe1cbaa1ee6957999 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 1 Jun 2015 18:04:25 +0800 Subject: Marked as 0.2.9 --- public/vendor/codemirror/addon/edit/closebrackets.js | 10 +++++----- public/vendor/codemirror/addon/edit/continuelist.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'public/vendor/codemirror/addon') diff --git a/public/vendor/codemirror/addon/edit/closebrackets.js b/public/vendor/codemirror/addon/edit/closebrackets.js index 2bbc6f2a..35b5b32c 100755 --- a/public/vendor/codemirror/addon/edit/closebrackets.js +++ b/public/vendor/codemirror/addon/edit/closebrackets.js @@ -63,7 +63,7 @@ } for (var i = ranges.length - 1; i >= 0; i--) { var cur = ranges[i].head; - cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1)); + cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete"); } } @@ -79,7 +79,7 @@ if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass; } cm.operation(function() { - cm.replaceSelection("\n\n", null); + cm.replaceSelection("\n\n", null, "+input"); cm.execCommand("goCharLeft"); ranges = cm.listSelections(); for (var i = 0; i < ranges.length; i++) { @@ -144,12 +144,12 @@ var sels = cm.getSelections(); for (var i = 0; i < sels.length; i++) sels[i] = left + sels[i] + right; - cm.replaceSelections(sels, "around"); + cm.replaceSelections(sels, "around", "+input"); } else if (type == "both") { - cm.replaceSelection(left + right, null); + cm.replaceSelection(left + right, null, "+input"); cm.execCommand("goCharLeft"); } else if (type == "addFour") { - cm.replaceSelection(left + left + left + left, "before"); + cm.replaceSelection(left + left + left + left, "before", "+input"); cm.execCommand("goCharRight"); } }); diff --git a/public/vendor/codemirror/addon/edit/continuelist.js b/public/vendor/codemirror/addon/edit/continuelist.js index 930c7324..e21d0f95 100755 --- a/public/vendor/codemirror/addon/edit/continuelist.js +++ b/public/vendor/codemirror/addon/edit/continuelist.js @@ -11,8 +11,8 @@ })(function(CodeMirror) { "use strict"; - var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\s*)/, - emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)\.)(\s*)$/, + var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\[\s\]\s|\[x\]\s|\s*)/, + emptyListRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\[\s\]\s*|\[x\]\s|\s*)$/, unorderedListRE = /[*+-]\s/; CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) { -- cgit v1.2.3