source: branches/2.2/plugins/LocalFilesEditor/codemirror/mode/diff/diff.js @ 10310

Last change on this file since 10310 was 10310, checked in by patdenice, 13 years ago

merge r10307 from trunk to branch 2.2
feature:2262
Replace editarea by Codemirror:
http://codemirror.net

File size: 331 bytes
Line 
1CodeMirror.defineMode("diff", function() {
2  return {
3    token: function(stream) {
4      var ch = stream.next();
5      stream.skipToEnd();
6      if (ch == "+") return "diff-plus";
7      if (ch == "-") return "diff-minus";
8      if (ch == "@") return "diff-rangeinfo";
9    }
10  };
11});
12
13CodeMirror.defineMIME("text/x-diff", "diff");
Note: See TracBrowser for help on using the repository browser.