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

Method addKeyword

webdiff/static/js/highlight.min.js:39–39  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

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){

Callers 4

_Function · 0.80
mFunction · 0.80
pFunction · 0.80
gFunction · 0.80

Calls 3

addTextMethod · 0.95
openNodeMethod · 0.45
closeNodeMethod · 0.45

Tested by

no test coverage detected