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

Function c

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

Source from the content-addressed store, hash-verified

185 ;const s=r.result?r.result:f(r.language,r.code,t)
186 ;return s.code=r.code,x("after:highlight",s),s}function f(e,n,i,r){
187 const l=Object.create(null);function c(){if(!k.keywords)return void M.addText(S)
188 ;let e=0;k.keywordPatternRe.lastIndex=0;let n=k.keywordPatternRe.exec(S),t=""
189 ;for(;n;){t+=S.substring(e,n.index)
190 ;const i=w.case_insensitive?n[0].toLowerCase():n[0],r=(a=i,k.keywords[a]);if(r){
191 const[e,a]=r
192 ;if(M.addText(t),t="",l[i]=(l[i]||0)+1,l[i]<=7&&(A+=a),e.startsWith("_"))t+=n[0];else{
193 const t=w.classNameAliases[e]||e;M.addKeyword(n[0],t)}}else t+=n[0]
194 ;e=k.keywordPatternRe.lastIndex,n=k.keywordPatternRe.exec(S)}var a
195 ;t+=S.substring(e),M.addText(t)}function g(){null!=k.subLanguage?(()=>{
196 if(""===S)return;let e=null;if("string"==typeof k.subLanguage){
197 if(!a[k.subLanguage])return void M.addText(S)
198 ;e=f(k.subLanguage,S,!0,x[k.subLanguage]),x[k.subLanguage]=e._top

Callers 3

gFunction · 0.70
uFunction · 0.70
highlight.min.jsFile · 0.70

Calls 3

addKeywordMethod · 0.80
addTextMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected