aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/templates/syntaxhighlighter/shBrushJScript.js
diff options
context:
space:
mode:
authorIgor Minar2011-01-10 21:03:50 -0800
committerIgor Minar2011-01-10 21:03:50 -0800
commit4f5d5029c278fdecd7a80b217bfc21461e30abe8 (patch)
tree58c5c99629179cd0984b4ea6cd2cbf53f9d3cd3a /docs/src/templates/syntaxhighlighter/shBrushJScript.js
parentf534def0c63a8dddd5ce7ddc92363a26b66bac54 (diff)
downloadangular.js-4f5d5029c278fdecd7a80b217bfc21461e30abe8.tar.bz2
offline docs
- freezing syntaxhighlighter and jquery under docs/src/templates/ - for jquery I just used a symlink to lib/jquery not an ideal solution but writer.js is not very flexible and I didn't want to mess with it - changed docs' index.html to point to the local resources
Diffstat (limited to 'docs/src/templates/syntaxhighlighter/shBrushJScript.js')
-rw-r--r--docs/src/templates/syntaxhighlighter/shBrushJScript.js52
1 files changed, 52 insertions, 0 deletions
diff --git a/docs/src/templates/syntaxhighlighter/shBrushJScript.js b/docs/src/templates/syntaxhighlighter/shBrushJScript.js
new file mode 100644
index 00000000..ff98daba
--- /dev/null
+++ b/docs/src/templates/syntaxhighlighter/shBrushJScript.js
@@ -0,0 +1,52 @@
+/**
+ * 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()
+ {
+ var keywords = 'break case catch continue ' +
+ 'default delete do else false ' +
+ 'for function if in instanceof ' +
+ 'new null return super switch ' +
+ 'this throw true try typeof var while with'
+ ;
+
+ var r = SyntaxHighlighter.regexLib;
+
+ this.regexList = [
+ { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
+ { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
+ { regex: r.singleLineCComments, css: 'comments' }, // one line comments
+ { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
+ { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
+ ];
+
+ this.forHtmlScript(r.scriptScriptTags);
+ };
+
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
+ Brush.aliases = ['js', 'jscript', 'javascript'];
+
+ SyntaxHighlighter.brushes.JScript = Brush;
+
+ // CommonJS
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
+})();