3 * http://alexgorbatchev.com/SyntaxHighlighter
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
9 * 3.0.83 (July 02 2010)
12 * Copyright (C) 2004-2010 Alex Gorbatchev.
15 * Dual licensed under the MIT and GPL licenses.
20 typeof(require
) != 'undefined' ? SyntaxHighlighter
= require('shCore').SyntaxHighlighter
: null;
24 // Contributed by Andres Almiray
25 // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
27 var keywords
= 'as assert break case catch class continue def default do else extends finally ' +
28 'if in implements import instanceof interface new package property return switch ' +
29 'throw throws try while public protected private static';
30 var types
= 'void boolean byte char short int long float double';
31 var constants
= 'null';
32 var methods
= 'allProperties count get size '+
33 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
34 'findIndexOf grep inject max min reverseEach sort ' +
35 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
36 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
37 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
38 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
39 'transformChar transformLine withOutputStream withPrintWriter withStream ' +
40 'withStreams withWriter withWriterAppend write writeLine '+
41 'dump inspect invokeMethod print println step times upto use waitForOrKill '+
45 { regex
: SyntaxHighlighter
.regexLib
.singleLineCComments
, css
: 'comments' }, // one line comments
46 { regex
: SyntaxHighlighter
.regexLib
.multiLineCComments
, css
: 'comments' }, // multiline comments
47 { regex
: SyntaxHighlighter
.regexLib
.doubleQuotedString
, css
: 'string' }, // strings
48 { regex
: SyntaxHighlighter
.regexLib
.singleQuotedString
, css
: 'string' }, // strings
49 { regex
: /""".*"""/g, css
: 'string' }, // GStrings
50 { regex
: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css
: 'value' }, // numbers
51 { regex
: new RegExp(this.getKeywords(keywords
), 'gm'), css
: 'keyword' }, // goovy keyword
52 { regex
: new RegExp(this.getKeywords(types
), 'gm'), css
: 'color1' }, // goovy/java type
53 { regex
: new RegExp(this.getKeywords(constants
), 'gm'), css
: 'constants' }, // constants
54 { regex
: new RegExp(this.getKeywords(methods
), 'gm'), css
: 'functions' } // methods
57 this.forHtmlScript(SyntaxHighlighter
.regexLib
.aspScriptTags
);
60 Brush
.prototype = new SyntaxHighlighter
.Highlighter();
61 Brush
.aliases
= ['groovy'];
63 SyntaxHighlighter
.brushes
.Groovy
= Brush
;
66 typeof(exports
) != 'undefined' ? exports
.Brush
= Brush
: null;