Skip to content

Instantly share code, notes, and snippets.

@codingforpleasure
Created May 11, 2012 13:58
Show Gist options
  • Save codingforpleasure/2659837 to your computer and use it in GitHub Desktop.
Save codingforpleasure/2659837 to your computer and use it in GitHub Desktop.
Java Syntax Highlighting
/*
Dual licensed under the MIT and GPL licenses.
*/
(function(){function b(){var a=SyntaxHighlighter.regexLib;this.regexList=[{regex:a.multiLineDoubleQuotedString,css:"string"},{regex:a.multiLineSingleQuotedString,css:"string"},{regex:a.singleLineCComments,css:"comments"},{regex:a.multiLineCComments,css:"comments"},{regex:/\s*#.*/gm,css:"preprocessor"},{regex:RegExp(this.getKeywords("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"),"gm"),css:"keyword"}];
this.forHtmlScript(a.scriptScriptTags)}"undefined"!=typeof require&&(SyntaxHighlighter=require("shCore").SyntaxHighlighter);b.prototype=new SyntaxHighlighter.Highlighter;b.aliases=["js","jscript","javascript"];SyntaxHighlighter.brushes.JScript=b;"undefined"!=typeof exports&&(exports.Brush=b)})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment