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

Method addSublanguage

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

Source from the content-addressed store, hash-verified

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,")")}

Callers 1

dFunction · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected