MCPcopy Create free account
hub / github.com/unconed/TermKit / Brush

Function Brush

HTML/external/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js:22–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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'];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected