//
// Begin anonymous function. This is used to contain local scope variables without polutting global scope.
//
if (typeof(SyntaxHighlighter) == 'undefined') var SyntaxHighlighter = function() {
// CommonJS
if (typeof(require) != 'undefined' && typeof(XRegExp) == 'undefined')
{
XRegExp = require('XRegExp').XRegExp;
}
// Shortcut object which will be assigned to the SyntaxHighlighter variable.
// This is a shorthand for local reference in order to avoid long namespace
// references to SyntaxHighlighter.whatever...
var sh = {
defaults : {
/** Additional CSS class names to be added to highlighter elements. */
'class-name' : '',
/** First line number. */
'first-line' : 1,
/**
* Pads line numbers. Possible values are:
*
* false - don't pad line numbers.
* true - automaticaly pad numbers with minimum required number of leading zeroes.
* [int] - length up to which pad line numbers.
*/
'pad-line-numbers' : false,
/** Lines to highlight. */
'highlight' : null,
/** Title to be displayed above the code block. */
'title' : null,
/** Enables or disables smart tabs. */
'smart-tabs' : true,
/** Gets or sets tab size. */
'tab-size' : 4,
/** Enables or disables gutter. */
'gutter' : true,
/** Enables or disables toolbar. */
'toolbar' : true,
/** Enables quick code copy and paste from double click. */
'quick-code' : true,
/** Forces code view to be collapsed. */
'collapse' : false,
/** Enables or disables automatic links. */
'auto-links' : true,
/** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */
'light' : false,
'unindent' : true,
'html-script' : false
},
config : {
space : ' ',
/** Enables use of tags. */
useScriptTags : true,
/** Blogger mode flag. */
bloggerMode : false,
stripBrs : false,
/** Name of the tag that SyntaxHighlighter will automatically look for. */
tagName : 'pre',
strings : {
expandSource : 'expand source',
help : '?',
alert: 'SyntaxHighlighter\n\n',
noBrush : 'Can\'t find brush for: ',
brushNotHtmlScript : 'Brush wasn\'t configured for html-script option: ',
// this is populated by the build script
aboutDialog : '@ABOUT@'
}
},
/** Internal 'global' variables. */
vars : {
discoveredBrushes : null,
highlighters : {}
},
/** This object is populated by user included external brush files. */
brushes : {},
/** Common regular expressions. */
regexLib : {
multiLineCComments : /\/\*[\s\S]*?\*\//gm,
singleLineCComments : /\/\/.*$/gm,
singleLinePerlComments : /#.*$/gm,
doubleQuotedString : /"([^\\"\n]|\\.)*"/g,
singleQuotedString : /'([^\\'\n]|\\.)*'/g,
multiLineDoubleQuotedString : new XRegExp('"([^\\\\"]|\\\\.)*"', 'gs'),
multiLineSingleQuotedString : new XRegExp("'([^\\\\']|\\\\.)*'", 'gs'),
xmlComments : /(<|<)!--[\s\S]*?--(>|>)/gm,
url : /\w+:\/\/[\w-.\/?%&=:@;#]*/g,
/** = ?> tags. */
phpScriptTags : { left: /(<|<)\?(?:=|php)?/g, right: /\?(>|>)/g, 'eof' : true },
/** <%= %> tags. */
aspScriptTags : { left: /(<|<)%=?/g, right: /%(>|>)/g },
/**