MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / W

Function W

hyperagent-ext/media/scripts/highlight.min.js:110–123  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

108 },Z=Error();function G(e,n,{key:t}){let a=0;const i=e[t],r={},s={}
109 ;for(let e=1;e<=n.length;e++)s[e+a]=i[e],r[e+a]=!0,a+=_(n[e-1])
110 ;e[t]=s,e[t]._emit=r,e[t]._multi=!0}function W(e){(e=>{
111 e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,
112 delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={
113 _wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope
114 }),(e=>{if(Array.isArray(e.begin)){
115 if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
116 Z
117 ;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"),
118 Z;G(e,e.begin,{key:"beginScope"}),e.begin=f(e.begin,{joinWith:""})}})(e),(e=>{
119 if(Array.isArray(e.end)){
120 if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
121 Z
122 ;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"),
123 Z;G(e,e.end,{key:"endScope"}),e.end=f(e.end,{joinWith:""})}})(e)}function Q(e){
124 function n(n,t){
125 return RegExp(d(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":""))
126 }class t{constructor(){

Callers

nothing calls this directly

Calls 3

GFunction · 0.85
KFunction · 0.70
fFunction · 0.70

Tested by

no test coverage detected