1;(function() 2{ 3 // CommonJS 4 SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); 5 6 function Brush() 7 { 8 this.regexList = [ 9 { regex: /^\+\+\+ .*$/gm, css: 'color2' }, // new file 10 { regex: /^\-\-\- .*$/gm, css: 'color2' }, // old file 11 { regex: /^\s.*$/gm, css: 'color1' }, // unchanged 12 { regex: /^@@.*@@.*$/gm, css: 'variable' }, // location 13 { regex: /^\+.*$/gm, css: 'string' }, // additions 14 { regex: /^\-.*$/gm, css: 'color3' } // deletions 15 ]; 16 }; 17 18 Brush.prototype = new SyntaxHighlighter.Highlighter(); 19 Brush.aliases = ['diff', 'patch']; 20 21 SyntaxHighlighter.brushes.Diff = Brush; 22 23 // CommonJS 24 typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 25})(); 26