1 CodeMirror.defineMode("diff", function() {
10 token: function(stream) {
11 var tw_pos = stream.string.search(/[\t ]+?$/);
13 if (!stream.sol() || tw_pos === 0) {
16 TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
19 var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
32 CodeMirror.defineMIME("text/x-diff", "diff");