X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=assets%2Fsyntax%2Fscripts%2FshBrushDiff.js;fp=assets%2Fsyntax%2Fscripts%2FshBrushDiff.js;h=e9b14fc580a4826ad762b742e9102f4bfb8a152a;hb=4fdb6152f6035dec5d3b46b23cb7f7f15072ef4b;hp=0000000000000000000000000000000000000000;hpb=7d05bc31df7579040af812d878a8553309a94799;p=disinclined.org.git diff --git a/assets/syntax/scripts/shBrushDiff.js b/assets/syntax/scripts/shBrushDiff.js new file mode 100644 index 0000000..e9b14fc --- /dev/null +++ b/assets/syntax/scripts/shBrushDiff.js @@ -0,0 +1,41 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +;(function() +{ + // CommonJS + typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; + + function Brush() + { + this.regexList = [ + { regex: /^\+\+\+.*$/gm, css: 'color2' }, + { regex: /^\-\-\-.*$/gm, css: 'color2' }, + { regex: /^\s.*$/gm, css: 'color1' }, + { regex: /^@@.*@@$/gm, css: 'variable' }, + { regex: /^\+[^\+]{1}.*$/gm, css: 'string' }, + { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' } + ]; + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['diff', 'patch']; + + SyntaxHighlighter.brushes.Diff = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})();