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

Method constructor

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

Source from the content-addressed store, hash-verified

25closeNode(e){i(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){
26this.buffer+=`<span class="${e}">`}}const o=(e={})=>{const t={children:[]}
27;return Object.assign(t,e),t};class l{constructor(){
28this.rootNode=o(),this.stack=[this.rootNode]}get top(){
29return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
30this.top.children.push(e)}openNode(e){const t=o({scope:e})
31;this.add(t),this.stack.push(t)}closeNode(){

Callers

nothing calls this directly

Calls 1

oFunction · 0.70

Tested by

no test coverage detected