3 * http://alexgorbatchev.com/SyntaxHighlighter
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
9 * 3.0.83 (July 02 2010)
12 * Copyright (C) 2004-2010 Alex Gorbatchev.
15 * Dual licensed under the MIT and GPL licenses.
20 typeof(require
) != 'undefined' ? SyntaxHighlighter
= require('shCore').SyntaxHighlighter
: null;
24 // Contributed by Gheorghe Milas and Ahmad Sherif
26 var keywords
= 'and assert break class continue def del elif else ' +
27 'except exec finally for from global if import in is ' +
28 'lambda not or pass print raise return try yield while';
30 var funcs
= '__import__ abs all any apply basestring bin bool buffer callable ' +
31 'chr classmethod cmp coerce compile complex delattr dict dir ' +
32 'divmod enumerate eval execfile file filter float format frozenset ' +
33 'getattr globals hasattr hash help hex id input int intern ' +
34 'isinstance issubclass iter len list locals long map max min next ' +
35 'object oct open ord pow print property range raw_input reduce ' +
36 'reload repr reversed round set setattr slice sorted staticmethod ' +
37 'str sum super tuple type type unichr unicode vars xrange zip';
39 var special
= 'None True False self cls class_';
42 { regex
: SyntaxHighlighter
.regexLib
.singleLinePerlComments
, css
: 'comments' },
43 { regex
: /^\s*@\w+/gm, css
: 'decorator' },
44 { regex
: /(['\"]{3})([^\1])*?\1/gm, css
: 'comments' },
45 { regex
: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css
: 'string' },
46 { regex
: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css
: 'string' },
47 { regex
: /\+|\-|\*|\/|\%|=|==/gm, css
: 'keyword' },
48 { regex
: /\b\d+\.?\w*/g, css
: 'value' },
49 { regex
: new RegExp(this.getKeywords(funcs
), 'gmi'), css
: 'functions' },
50 { regex
: new RegExp(this.getKeywords(keywords
), 'gm'), css
: 'keyword' },
51 { regex
: new RegExp(this.getKeywords(special
), 'gm'), css
: 'color1' }
54 this.forHtmlScript(SyntaxHighlighter
.regexLib
.aspScriptTags
);
57 Brush
.prototype = new SyntaxHighlighter
.Highlighter();
58 Brush
.aliases
= ['py', 'python'];
60 SyntaxHighlighter
.brushes
.Python
= Brush
;
63 typeof(exports
) != 'undefined' ? exports
.Brush
= Brush
: null;