Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
// CodeMirror, copyright (c) by Marijn Haverbeke and others// Distributed under an MIT license: http://codemirror.net/LICENSE(function(mod){if(typeofexports=="object"&&typeofmodule=="object")// CommonJSmod(require("../../lib/codemirror"));elseif(typeofdefine=="function"&&define.amd)// AMDdefine(["../../lib/codemirror"],mod);else// Plain browser envmod(CodeMirror);})(function(CodeMirror){"use strict";CodeMirror.defineMode("diff",function(){varTOKEN_NAMES={'+':'positive','-':'negative','@':'meta'};return{token:function(stream){vartw_pos=stream.string.search(/[\t ]+?$/);if(!stream.sol()||tw_pos===0){stream.skipToEnd();return("error "+(TOKEN_NAMES[stream.string.charAt(0)]||'')).replace(/ $/,'');}vartoken_name=TOKEN_NAMES[stream.peek()]||stream.skipToEnd();if(tw_pos===-1){stream.skipToEnd();}else{stream.pos=tw_pos;}returntoken_name;}};});CodeMirror.defineMIME("text/x-diff","diff");});