MCPcopy Create free account
hub / github.com/Macuyiko/minecraft-python / guardedRegexp

Function guardedRegexp

ServerEditorWeb/ace/ext-language_tools.js:467–480  ·  view source on GitHub ↗
(re, guard, opening)

Source from the content-addressed store, hash-verified

465 return src || "";
466 }
467 function guardedRegexp(re, guard, opening) {
468 re = wrapRegexp(re);
469 guard = wrapRegexp(guard);
470 if (opening) {
471 re = guard + re;
472 if (re && re[re.length - 1] != "$")
473 re = re + "$";
474 } else {
475 re = re + guard;
476 if (re && re[0] != "^")
477 re = "^" + re;
478 }
479 return new RegExp(re);
480 }
481
482 function addSnippet(s) {
483 if (!s.scope)

Callers 1

addSnippetFunction · 0.70

Calls 1

wrapRegexpFunction · 0.70

Tested by

no test coverage detected