Skip to content

Commit f657476

Browse files
committed
Update build files
1 parent 4c1b2d4 commit f657476

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

public/cui.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51127,6 +51127,36 @@ CUI.Label = (function(superClass) {
5112751127
return nodes;
5112851128
};
5112951129

51130+
Label.parseWithRegex = function(text, regexp, getElement) {
51131+
var lastIndex, match, matchIndex, matchText, node, nodes, preText, tail;
51132+
nodes = [];
51133+
lastIndex = 0;
51134+
if (!regexp.global) {
51135+
throw new Error("RegExp must have the /g flag");
51136+
}
51137+
regexp.lastIndex = 0;
51138+
while (match = regexp.exec(text)) {
51139+
matchText = match[0];
51140+
matchIndex = match.index;
51141+
if (matchIndex > lastIndex) {
51142+
preText = text.substring(lastIndex, matchIndex);
51143+
nodes.push(CUI.dom.text(preText));
51144+
}
51145+
node = getElement(matchText, matchIndex, text);
51146+
if (node != null) {
51147+
nodes.push(node);
51148+
} else {
51149+
nodes.push(CUI.dom.text(matchText));
51150+
}
51151+
lastIndex = regexp.lastIndex;
51152+
}
51153+
if (lastIndex < text.length) {
51154+
tail = text.substring(lastIndex);
51155+
nodes.push(CUI.dom.text(tail));
51156+
}
51157+
return nodes;
51158+
};
51159+
5113051160
return Label;
5113151161

5113251162
})(CUI.DOMElement);

public/cui.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)