summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/diff/diff.js
diff options
context:
space:
mode:
authorWu Cheng-Han2016-11-28 01:36:48 +0800
committerWu Cheng-Han2016-11-28 01:36:48 +0800
commit9f79ed929e4156dc8b5b45161895d70d51cfa5a2 (patch)
tree760e0491a52558036b93b0c986e96aa95b4c0127 /public/vendor/codemirror/mode/diff/diff.js
parent3a305b8258782797b328f2ce46e8bb74e9603594 (diff)
Update to move custom CodeMirror codebase to our own repo and update webpack build config
Diffstat (limited to '')
-rw-r--r--public/vendor/codemirror/mode/diff/diff.js47
1 files changed, 0 insertions, 47 deletions
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");
-
-});