MCPcopy Index your code
hub / github.com/clips/pattern / process

Function process

documentation/js/shBrushXml.js:24–53  ·  view source on GitHub ↗
(match, regexInfo)

Source from the content-addressed store, hash-verified

22 function Brush()
23 {
24 function process(match, regexInfo)
25 {
26 var constructor = SyntaxHighlighter.Match,
27 code = match[0],
28 tag = new XRegExp('(&lt;|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
29 result = []
30 ;
31
32 if (match.attributes != null)
33 {
34 var attributes,
35 regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
36 '\\s*=\\s*' +
37 '(?<value> ".*?"|\'.*?\'|\\w+)',
38 'xg');
39
40 while ((attributes = regex.exec(code)) != null)
41 {
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'));
44 }
45 }
46
47 if (tag != null)
48 result.push(
49 new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
50 );
51
52 return result;
53 }
54
55 this.regexList = [
56 { regex: new XRegExp('(\\&lt;|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\&gt;|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…