MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / addKeyword

Method addKeyword

hyperagent-ext/media/scripts/highlight.min.js:39–39  ·  view source on GitHub ↗
(e,n)

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=>{
38 l._collapse(e)})))}}class c extends l{constructor(e){super(),this.options=e}
39 addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}
40 addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root
41 ;t.sublanguage=!0,t.language=n,this.add(t)}toHTML(){
42 return new s(this,this.options).value()}finalize(){return!0}}function d(e){

Callers 4

cFunction · 0.80
uFunction · 0.80
bFunction · 0.80
_Function · 0.80

Calls 3

addTextMethod · 0.95
openNodeMethod · 0.45
closeNodeMethod · 0.45

Tested by

no test coverage detected