From 9f79ed929e4156dc8b5b45161895d70d51cfa5a2 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 28 Nov 2016 01:36:48 +0800 Subject: Update to move custom CodeMirror codebase to our own repo and update webpack build config --- .../vendor/codemirror/addon/edit/continuelist.js | 54 ---------------------- 1 file changed, 54 deletions(-) delete mode 100644 public/vendor/codemirror/addon/edit/continuelist.js (limited to 'public/vendor/codemirror/addon/edit/continuelist.js') diff --git a/public/vendor/codemirror/addon/edit/continuelist.js b/public/vendor/codemirror/addon/edit/continuelist.js deleted file mode 100644 index 18db07fc..00000000 --- a/public/vendor/codemirror/addon/edit/continuelist.js +++ /dev/null @@ -1,54 +0,0 @@ -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror"], mod); - else // Plain browser env - mod(CodeMirror); -})(function(CodeMirror) { - "use strict"; - - 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) { - if (cm.getOption("disableInput")) return CodeMirror.Pass; - var ranges = cm.listSelections(), replacements = []; - for (var i = 0; i < ranges.length; i++) { - var pos = ranges[i].head; - var eolState = cm.getStateAfter(pos.line); - var inList = eolState.list !== false; - var inQuote = eolState.quote !== 0; - - var line = cm.getLine(pos.line), match = listRE.exec(line); - if (!ranges[i].empty() || (!inList && !inQuote) || !match) { - cm.execCommand("newlineAndIndent"); - return; - } - if (emptyListRE.test(line)) { - cm.replaceRange("", { - line: pos.line, ch: 0 - }, { - line: pos.line, ch: pos.ch + 1 - }); - replacements[i] = "\n"; - } else { - var indent = match[1], after = match[5]; - var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0 - ? match[2] - : (parseInt(match[3], 10) + 1) + match[4]; - - // make todo list default unchecked - after = after.replace('[x]', '[ ]'); - - replacements[i] = "\n" + indent + bullet + after; - } - } - - cm.replaceSelections(replacements); - }; -}); -- cgit v1.2.3