aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/codemirror/mode/diff/diff.js
blob: 619d74e2af0164d6024f113b78a83bc833fa683e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
CodeMirror.defineMode("diff", function() {
  return {
    token: function(stream) {
      var ch = stream.next();
      stream.skipToEnd();
      if (ch == "+") return "diff-plus";
      if (ch == "-") return "diff-minus";
      if (ch == "@") return "diff-rangeinfo";
    }
  };
});

CodeMirror.defineMIME("text/x-diff", "diff");