MCPcopy Create free account
hub / github.com/Hashnode/starter-kit / getMatcher

Method getMatcher

packages/utils/renderer/highlight.js:588–597  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

586 (this.regexIndex = 0);
587 }
588 getMatcher(e) {
589 if (this.multiRegexes[e]) return this.multiRegexes[e];
590 const n = new t();
591 return (
592 this.rules.slice(e).forEach(([e, t]) => n.addRule(e, t)),
593 n.compile(),
594 (this.multiRegexes[e] = n),
595 n
596 );
597 }
598 resumingScanAtSamePosition() {
599 return 0 != this.regexIndex;
600 }

Callers 1

execMethod · 0.95

Calls 2

addRuleMethod · 0.95
compileMethod · 0.95

Tested by

no test coverage detected