MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / l

Class l

pages/viewScriptSource/libs/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=>{
38c._collapse(e)})))}}class l extends c{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 n=e.root
41;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){
42return new o(this,this.options).value()}finalize(){return!0}}function g(e){
43return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")}
44function u(e){return p("(?:",e,")*")}function h(e){return p("(?:",e,")?")}
45function p(...e){return e.map((e=>g(e))).join("")}function f(...e){const t=(e=>{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected