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

Method closeNode

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

Source from the content-addressed store, hash-verified

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(){
32if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
33for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
34walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){
35return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),

Callers 1

closeAllNodesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected