MCPcopy Create free account
hub / github.com/danvk/webdiff / exec

Method exec

webdiff/static/js/highlight.min.js:143–149  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

141t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
142return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
143this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
144const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex
145;let a=t.exec(e)
146;if(this.resumingScanAtSamePosition())if(a&&a.index===this.lastIndex);else{
147const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,a=t.exec(e)}
148return a&&(this.regexIndex+=a.position+1,
149this.regexIndex===this.count&&this.considerAll()),a}}
150if(e.compilerExtensions||(e.compilerExtensions=[]),
151e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
152;return e.classNameAliases=r(e.classNameAliases||{}),function a(i,s){const o=i

Callers

nothing calls this directly

Calls 4

getMatcherMethod · 0.95
considerAllMethod · 0.95
execMethod · 0.45

Tested by

no test coverage detected