aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinweiClarkChao <[email protected]>2014-09-23 22:34:14 +0800
committerJinwei Zhao <[email protected]>2017-01-13 15:07:44 +0800
commitb214f38d2c24a890ce36512a0c8bab965e27a508 (patch)
tree1522b651444407cbf120798e79be4657f1b472ab /Code/Blocks/syntax/scripts/shBrushJScript.js
parente13882d1656b143533cec307a19425e0a56ec999 (diff)
downloadjinwei.me-b214f38d2c24a890ce36512a0c8bab965e27a508.tar.gz
README
Diffstat (limited to 'Code/Blocks/syntax/scripts/shBrushJScript.js')
-rw-r--r--Code/Blocks/syntax/scripts/shBrushJScript.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/Code/Blocks/syntax/scripts/shBrushJScript.js b/Code/Blocks/syntax/scripts/shBrushJScript.js
new file mode 100644
index 0000000..ff98dab
--- /dev/null
+++ b/Code/Blocks/syntax/scripts/shBrushJScript.js
@@ -0,0 +1,52 @@
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 var keywords = 'break case catch continue ' +
25 'default delete do else false ' +
26 'for function if in instanceof ' +
27 'new null return super switch ' +
28 'this throw true try typeof var while with'
29 ;
30
31 var r = SyntaxHighlighter.regexLib;
32
33 this.regexList = [
34 { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
35 { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
36 { regex: r.singleLineCComments, css: 'comments' }, // one line comments
37 { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
38 { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
39 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
40 ];
41
42 this.forHtmlScript(r.scriptScriptTags);
43 };
44
45 Brush.prototype = new SyntaxHighlighter.Highlighter();
46 Brush.aliases = ['js', 'jscript', 'javascript'];
47
48 SyntaxHighlighter.brushes.JScript = Brush;
49
50 // CommonJS
51 typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
52})();
Powered by cgit v1.2.3 (git 2.41.0)