MCPcopy Create free account
hub / github.com/idank/explainshell / addText

Method addText

explainshell/web/static/js/highlight.min.js:19–20  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

17 ;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}const s=e=>!!e.scope
18 ;class o{constructor(e,t){
19 this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){
20 this.buffer+=n(e)}openNode(e){if(!s(e))return;const t=((e,{prefix:t})=>{
21 if(e.startsWith("language:"))return e.replace("language:","language-")
22 ;if(e.includes(".")){const n=e.split(".")
23 ;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")

Callers 5

_walkMethod · 0.45
lFunction · 0.45
gFunction · 0.45
uFunction · 0.45
xFunction · 0.45

Calls 1

nFunction · 0.70

Tested by

no test coverage detected