MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / addKeyword

Method addKeyword

vulnerablecode/static/js/highlight-10.6.0.min.js:34–34  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

32"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
33l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e}
34addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}
35addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root
36;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){
37return new o(this,this.options).value()}finalize(){return!0}}function u(e){

Callers 1

dFunction · 0.80

Calls 3

addTextMethod · 0.95
openNodeMethod · 0.45
closeNodeMethod · 0.45

Tested by

no test coverage detected