MCPcopy Create free account
hub / github.com/celtera/avendish / addText

Method addText

book/theme/highlight.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 o=e=>!!e.kind
18;class a{constructor(e,t){
19this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){
20this.buffer+=r(e)}openNode(e){if(!o(e))return;let t=e.kind
21;t=e.sublanguage?"language-"+t:((e,{prefix:t})=>{if(e.includes(".")){
22const n=e.split(".")
23;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")

Callers 4

_walkMethod · 0.45
lFunction · 0.45
dFunction · 0.45
xFunction · 0.45

Calls 1

rFunction · 0.85

Tested by

no test coverage detected