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

Function K

webdiff/static/js/highlight.min.js:111–124  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

109},W=Error();function Q(e,t,{key:a}){let n=0;const r=e[a],i={},s={}
110;for(let e=1;e<=t.length;e++)s[e+n]=r[e],i[e+n]=!0,n+=S(t[e-1])
111;e[a]=s,e[a]._emit=i,e[a]._multi=!0}function K(e){(e=>{
112e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,
113delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={
114_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope
115}),(e=>{if(Array.isArray(e.begin)){
116if(e.skip||e.excludeBegin||e.returnBegin)throw q("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
117W
118;if("object"!=typeof e.beginScope||null===e.beginScope)throw q("beginScope must be object"),
119W;Q(e,e.begin,{key:"beginScope"}),e.begin=b(e.begin,{joinWith:""})}})(e),(e=>{
120if(Array.isArray(e.end)){
121if(e.skip||e.excludeEnd||e.returnEnd)throw q("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
122W
123;if("object"!=typeof e.endScope||null===e.endScope)throw q("endScope must be object"),
124W;Q(e,e.end,{key:"endScope"}),e.end=b(e.end,{joinWith:""})}})(e)}function j(e){
125function t(t,a){
126return RegExp(d(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))
127}class a{constructor(){

Callers

nothing calls this directly

Calls 3

qFunction · 0.85
QFunction · 0.85
bFunction · 0.70

Tested by

no test coverage detected