diff options
author | JinweiClarkChao <[email protected]> | 2014-09-23 22:34:14 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2017-01-13 15:07:44 +0800 |
commit | b214f38d2c24a890ce36512a0c8bab965e27a508 (patch) | |
tree | 1522b651444407cbf120798e79be4657f1b472ab /Back/Blocks/syntax/scripts/shBrushPython.js | |
parent | e13882d1656b143533cec307a19425e0a56ec999 (diff) | |
download | jinwei.me-b214f38d2c24a890ce36512a0c8bab965e27a508.tar.gz |
README
Diffstat (limited to 'Back/Blocks/syntax/scripts/shBrushPython.js')
-rw-r--r-- | Back/Blocks/syntax/scripts/shBrushPython.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/Back/Blocks/syntax/scripts/shBrushPython.js b/Back/Blocks/syntax/scripts/shBrushPython.js deleted file mode 100644 index ce77462..0000000 --- a/Back/Blocks/syntax/scripts/shBrushPython.js +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
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 | |||
22 | function Brush() | ||
23 | { | ||
24 | // Contributed by Gheorghe Milas and Ahmad Sherif | ||
25 | |||
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'; | ||
29 | |||
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'; | ||
38 | |||
39 | var special = 'None True False self cls class_'; | ||
40 | |||
41 | this.regexList = [ | ||
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' } | ||
52 | ]; | ||
53 | |||
54 | this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags); | ||
55 | }; | ||
56 | |||
57 | Brush.prototype = new SyntaxHighlighter.Highlighter(); | ||
58 | Brush.aliases = ['py', 'python']; | ||
59 | |||
60 | SyntaxHighlighter.brushes.Python = Brush; | ||
61 | |||
62 | // CommonJS | ||
63 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; | ||
64 | })(); | ||