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 --- public/vendor/codemirror/mode/diff/diff.js | 47 ------------------------------ 1 file changed, 47 deletions(-) delete mode 100644 public/vendor/codemirror/mode/diff/diff.js (limited to 'public/vendor/codemirror/mode/diff/diff.js') diff --git a/public/vendor/codemirror/mode/diff/diff.js b/public/vendor/codemirror/mode/diff/diff.js deleted file mode 100644 index fe0305e7..00000000 --- a/public/vendor/codemirror/mode/diff/diff.js +++ /dev/null @@ -1,47 +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"; - -CodeMirror.defineMode("diff", function() { - - var TOKEN_NAMES = { - '+': 'positive', - '-': 'negative', - '@': 'meta' - }; - - return { - token: function(stream) { - var tw_pos = stream.string.search(/[\t ]+?$/); - - if (!stream.sol() || tw_pos === 0) { - stream.skipToEnd(); - return ("error " + ( - TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); - } - - var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); - - if (tw_pos === -1) { - stream.skipToEnd(); - } else { - stream.pos = tw_pos; - } - - return token_name; - } - }; -}); - -CodeMirror.defineMIME("text/x-diff", "diff"); - -}); -- cgit v1.2.3