MCPcopy
hub / github.com/unclecode/crawl4ai / addRule

Method addRule

docs/md_v2/assets/highlight.min.js:129–131  ·  view source on GitHub ↗
(e,n)

Source from the content-addressed store, hash-verified

127 }class t{constructor(){
128 this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
129 addRule(e,n){
130 n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),
131 this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
132 ;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(h(e,{joinWith:"|"
133 }),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex
134 ;const n=this.matcherRe.exec(e);if(!n)return null

Callers 1

getMatcherMethod · 0.95

Calls 1

pFunction · 0.85

Tested by

no test coverage detected