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 function process(match, regexInfo)
26 var constructor = SyntaxHighlighter.Match,
28 tag = new XRegExp('(<|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
32 if (match.attributes != null)
35 regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
37 '(?<value> ".*?"|\'.*?\'|\\w+)',
40 while ((attributes = regex.exec(code)) != null)
42 result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
43 result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
49 new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
56 { regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>
57 { regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // <!-- ... -->
58 { regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
62 Brush.prototype = new SyntaxHighlighter.Highlighter();
63 Brush.aliases = ['xml', 'xhtml', 'xslt', 'html'];
65 SyntaxHighlighter.brushes.Xml = Brush;
68 typeof(exports) != 'undefined' ? exports.Brush = Brush : null;