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

Function N

docs/md_v2/assets/highlight.min.js:223–237  ·  view source on GitHub ↗
(a,r)

Source from the content-addressed store, hash-verified

221 x.scope&&S.closeNode(),x.skip||x.subLanguage||(C+=x.relevance),x=x.parent
222 }while(x!==i.parent);return i.starts&&b(i.starts,e),r.returnEnd?0:n.length}
223 let y={};function N(a,r){const o=r&&r[0];if(A+=a,null==o)return d(),0
224 ;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===o){
225 if(A+=t.slice(r.index,r.index+1),!s){const n=Error(`0 width match regex (${e})`)
226 ;throw n.languageName=e,n.badRule=y.rule,n}return 1}
227 if(y=r,"begin"===r.type)return(e=>{
228 const t=e[0],a=e.rule,i=new n(a),r=[a.__beforeBegin,a["on:begin"]]
229 ;for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return _(t)
230 ;return a.skip?A+=t:(a.excludeBegin&&(A+=t),
231 d(),a.returnBegin||a.excludeBegin||(A=t)),b(a,e),a.returnBegin?0:t.length})(r)
232 ;if("illegal"===r.type&&!i){
233 const e=Error('Illegal lexeme "'+o+'" for mode "'+(x.scope||"<unnamed>")+'"')
234 ;throw e.mode=x,e}if("end"===r.type){const e=h(r);if(e!==ee)return e}
235 if("illegal"===r.type&&""===o)return 1
236 ;if(R>1e5&&R>3*r.index)throw Error("potential infinite loop, way more iterations than matches")
237 ;return A+=o,o.length}const w=v(e)
238 ;if(!w)throw K(o.replace("{}",e)),Error('Unknown language: "'+e+'"')
239 ;const O=Q(w);let k="",x=r||O;const M={},S=new p.__emitter(p);(()=>{const e=[]
240 ;for(let n=x;n!==w;n=n.parent)n.scope&&e.unshift(n.scope)

Callers 3

fFunction · 0.85
wFunction · 0.85
vFunction · 0.85

Calls 5

dFunction · 0.85
_Function · 0.85
bFunction · 0.85
hFunction · 0.85
nFunction · 0.70

Tested by

no test coverage detected