1;(function() 2{ 3 // CommonJS 4 SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null); 5 6 function Brush() 7 { 8 var keywords = 'break case catch class continue ' + 9 'default delete do else enum export extends false ' + 10 'for function if implements import in instanceof ' + 11 'interface let new null package private protected ' + 12 'static return super switch ' + 13 'this throw true try typeof var while with yield'; 14 15 var r = SyntaxHighlighter.regexLib; 16 17 this.regexList = [ 18 { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings 19 { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings 20 { regex: r.singleLineCComments, css: 'comments' }, // one line comments 21 { regex: r.multiLineCComments, css: 'comments' }, // multiline comments 22 { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion 23 { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords 24 ]; 25 26 this.forHtmlScript(r.scriptScriptTags); 27 }; 28 29 Brush.prototype = new SyntaxHighlighter.Highlighter(); 30 Brush.aliases = ['js', 'jscript', 'javascript', 'json']; 31 32 SyntaxHighlighter.brushes.JScript = Brush; 33 34 // CommonJS 35 typeof(exports) != 'undefined' ? exports.Brush = Brush : null; 36})(); 37