shBrushDiff.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * SyntaxHighlighter
  3. * http://alexgorbatchev.com/SyntaxHighlighter
  4. *
  5. * SyntaxHighlighter is donationware. If you are using it, please donate.
  6. * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
  7. *
  8. * @version
  9. * 3.0.83 (July 02 2010)
  10. *
  11. * @copyright
  12. * Copyright (C) 2004-2010 Alex Gorbatchev.
  13. *
  14. * @license
  15. * Dual licensed under the MIT and GPL licenses.
  16. */
  17. ;(function()
  18. {
  19. // CommonJS
  20. typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
  21. function Brush()
  22. {
  23. this.regexList = [
  24. { regex: /^\+\+\+.*$/gm, css: 'color2' },
  25. { regex: /^\-\-\-.*$/gm, css: 'color2' },
  26. { regex: /^\s.*$/gm, css: 'color1' },
  27. { regex: /^@@.*@@$/gm, css: 'variable' },
  28. { regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
  29. { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
  30. ];
  31. };
  32. Brush.prototype = new SyntaxHighlighter.Highlighter();
  33. Brush.aliases = ['diff', 'patch'];
  34. SyntaxHighlighter.brushes.Diff = Brush;
  35. // CommonJS
  36. typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
  37. })();