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

Class _

webdiff/static/js/highlight.min.js:38–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){
37"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
38l._collapse(e)})))}}class _ extends l{constructor(e){super(),this.options=e}
39addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}
40addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const a=e.root
41;a.sublanguage=!0,a.language=t,this.add(a)}toHTML(){
42return new s(this,this.options).value()}finalize(){return!0}}function c(e){
43return RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function d(e){
44return e?"string"==typeof e?e:e.source:null}function m(e){return E("(?=",e,")")}
45function p(e){return E("(?:",e,")*")}function u(e){return E("(?:",e,")?")}

Callers 3

dFunction · 0.70
mFunction · 0.70
highlight.min.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected