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

Function _

webdiff/static/js/highlight.min.js:188–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

addKeywordMethod · 0.80
addTextMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected