wikiparser-node 1.37.0 → 1.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle-lsp.min.js +1 -1
- package/config/moegirl.json +3 -0
- package/data/ext/math.json +4 -9
- package/data/ext/score.json +4 -375
- package/dist/bin/config.js +1 -1
- package/dist/lib/lsp.js +24 -12
- package/extensions/dist/base.js +1 -1
- package/package.json +3 -2
package/bundle/bundle-lsp.min.js
CHANGED
|
@@ -32,7 +32,7 @@ ${d}${y}`,E=F=>{let V=new lr(N,x.slice(A,k==null?void 0:k.index),r,n);return F.i
|
|
|
32
32
|
`);for(let i=0;i<n.length;i++)n[i]=r(n[i],f(this,ne),f(this,ie),e);this.setText(n.join(`
|
|
33
33
|
`))},ru=function(){let{parseExternalLinks:e}=(xo(),K(Sd));this.setText(e(this.firstChild.toString(),f(this,ne),f(this,ie)))},nu=function(){let{parseMagicLinks:e}=(Pd(),K(Rd));this.setText(e(this.firstChild.toString(),f(this,ne),f(this,ie)))},iu=function(){if(f(this,ne).excludes.includes("list"))return;let{parseList:e}=(_d(),K(qd)),{firstChild:r,type:n,name:i}=this,s=r.toString().split(`
|
|
34
34
|
`),a={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],a,f(this,ne),f(this,ie));this.setText(s.join(`
|
|
35
|
-
`))},su=function(){if(f(this,ne).variants.length>0){let{parseConverter:e}=(Vd(),K(zd));this.setText(e(this.firstChild.toString(),f(this,ne),f(this,ie)))}};$=So});var J,$i,gd,Fa,zt,Ca,pd,Ae=L(()=>{"use strict";J={running:!1,run(o,t){let{running:e}=this;this.running=!0;let r=t==null?void 0:t.internal;t&&(t.internal=!0);let n=()=>{this.running=e,t&&(t.internal=r)};try{let{Token:i}=(z(),K(Mi)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,t){let{internal:e}=t;t.internal=!0;let r=o();return t.internal=e,r},rev:0},$i=o=>t=>t.type===o,gd=({type:o})=>o==="tr"||o==="table-syntax",Fa=o=>o==="redirect-target"||o==="link",zt=(o,t,e,r=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=r):i=Array.prototype.splice.apply(n,[t,e,...r]);for(let l=0;l<r.length;l++){let g=r[l];g.setAttribute("parentNode",o),g.setAttribute("nextSibling",n[t+l+1]),g.setAttribute("previousSibling",n[t+l-1])}return(s=n[t-1])==null||s.setAttribute("nextSibling",n[t]),(a=n[t+r.length])==null||a.setAttribute("previousSibling",n[t+r.length-1]),n===r&&o.setAttribute("childNodes",n),i},Ca=(o,t)=>{let e=o.toLowerCase(),[r,n]=t,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(r,e)&&r[e]]},pd=(o,t)=>Array.from({length:o},(e,r)=>t(r))});var Dn,lp,ou,au,dp,lu,up,wo,Zr,Mn,du=L(()=>{"use strict";ti();Dn=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),lp={"arg-in-ext":1,"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-json":[2,{duplicate:1}],"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"syntax-like":[2,{}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},ou={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},au=o=>Dn.has(o),dp=o=>au(o)||Array.isArray(o)&&au(o[0])&&(o.length===1||typeof o[1]=="object"),lu=(o,t,e)=>{if(!Dt.includes(t))throw new RangeError(`Unknown lint rule: ${t}`);if(e===void 0)return!1;if(dp(e))return o[t]=e,!0;throw new RangeError(`Invalid lint config for ${t}: ${JSON.stringify(e)}`)},up=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),wo=class{constructor(t){if(Object.assign(this,up(lp)),!!t)for(let[e,r]of Object.entries(t))lu(this,e,r)}getSeverity(t,e){var n,i;let r=this[t];return typeof r!="object"?Dn.get(r):e&&(i=Dn.get((n=r[1])==null?void 0:n[e]))!=null?i:Dn.get(r[0])}},Mn=class{constructor(t){w(this,Zr);if(Object.assign(this,ou),t&&!("rules"in t)&&Object.keys(t).some(e=>Dt.includes(e)))this.rules=t;else{let{rules:e,...r}=t!=null?t:{};this.rules=e;for(let[n,i]of Object.entries(r))i!==void 0&&Object.prototype.hasOwnProperty.call(ou,n)&&(this[n]=i)}}get rules(){return f(this,Zr)}set rules(t){S(this,Zr,new Proxy(new wo(t),{set:lu,deleteProperty(){return!1}}))}getSeverity(t,e){return f(this,Zr).getSeverity(t,e)}};Zr=new WeakMap});var uu,Hn,Gn,Oe,en,pr,Ui,gu,Un,pu=L(()=>{"use strict";He();ae();uu=o=>{let[,{length:t},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[t/3,e]},Un=class{constructor(t,e,r,{temporary:n,decode:i,selfLink:s,page:a}={}){w(this,Ui);w(this,Hn);w(this,Gn);w(this,Oe);w(this,en);w(this,pr);ge(this,"page");ge(this,"valid");ge(this,"encoded",!1);this.page=a;let l=t.trim(),g=l.startsWith("../");if(i&&t.includes("%"))try{let m=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(t);t=Ht(t),this.encoded=m}catch{}if(t=Mt(t).replace(/[_ ]+/gu," ").trim(),g||a&&l.startsWith("/"))S(this,en,0);else{let m=e;t.startsWith(":")&&(m=0,t=t.slice(1).trim());let c=t.split(":");if(c.length>1){let h=nt(c[0]),b=Object.prototype.hasOwnProperty.call(r.nsid,h)&&r.nsid[h];b&&(m=b,t=c.slice(1).join(":").trim())}S(this,en,m)}let u=t.indexOf("#");if(u!==-1){let m=t.slice(u).trim().slice(1);if(m.includes("%"))try{m=Ht(m)}catch{}S(this,pr,m.replace(/ /gu,"_")),t=t.slice(0,u).trim()}let[d,p]=g?uu(t):[0,t];this.valid=!!(t||s&&this.ns===0&&f(this,pr)!==void 0)&&Mt(t)===t&&(d===0||a===void 0||a.split("/",d+1).length>d)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(p),this.main=t,S(this,Gn,r.namespaces),S(this,Oe,r.articlePath||"/wiki/$1"),f(this,Oe).includes("$1")||S(this,Oe,f(this,Oe)+`${f(this,Oe).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return f(this,en)}get fragment(){return f(this,pr)}get main(){return f(this,Hn)}set main(t){t=t.replace(/_/gu," ").trim(),S(this,Hn,t&&t[0].toUpperCase()+t.slice(1))}get prefix(){let t=f(this,Gn)[this.ns];return t+(t&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:t}=this,e=t.lastIndexOf(".");return e===-1?void 0:t.slice(e+1).toLowerCase()}getRedirection(){let{prefix:t}=this,e=t;return C(this,Ui,gu).call(this,e)}setFragment(t){S(this,pr,t)}getUrl(t){{typeof t=="string"&&(S(this,Oe,t),f(this,Oe).includes("$1")||S(this,Oe,f(this,Oe)+`${f(this,Oe).endsWith("/")?"":"/"}$1`));let{title:e,fragment:r}=this;return e?f(this,Oe).replace("$1",encodeURIComponent(e)+(r?`#${encodeURIComponent(r)}`:"")):r===void 0?"":`#${encodeURIComponent(r)}`}throw new Error("Title.getUrl method is only available in the LSP version!")}};Hn=new WeakMap,Gn=new WeakMap,Oe=new WeakMap,en=new WeakMap,pr=new WeakMap,Ui=new WeakSet,gu=function(t){var r,n;let e=(t+this.main).replace(/ /gu,"_");if(e.startsWith("/"))e=((r=this.page)!=null?r:"")+e.replace(/(.)\/$/u,"$1");else if(e.startsWith("../")&&((n=this.page)!=null&&n.includes("/"))){let[i,s]=uu(e),a=this.page.split("/");a.length>i&&(e=a.slice(0,-i).join("/")+(s&&"/")+s)}return[!1,e]}});var Au={};re(Au,{LanguageService:()=>Co,tasks:()=>xu});var xu,gp,pp,cp,fp,Tu,mp,hp,bp,xp,cu,Tp,fu,Jn,yu,cr,ye,mu,ku,zn,Vn,tn,Hi,hu,yp,bu,Ee,jt,Tt,yt,fr,Xn,nn,sn,mr,H,Qn,qe,Lo,Eo,$o,vu,No,rn,Co,Su=L(()=>{"use strict";He();co();ti();Ai();G();ae();Ae();M();z();xu=new WeakMap,gp=new Set(["ref"]),pp=new Set(["ref","references"]),cp=new Set(["name","follow"]),fp=new Set(["group"]),Tu=new Set(["arg-name","template-name","link-target","parameter-key"]),mp=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...Tu]),hp=new Set(["text","comment","noinclude","include"]),bp=["ext","html","table"].map(o=>`${o}-attr#style`).join(),xp=Be(o=>new RegExp(`^(?:${o}|//)`,"iu")),cu=({type:o,parentNode:t,length:e,firstChild:r},n)=>o==="attr-value"&&e===1&&r.type==="text"&&(!n||t.name==="style"),Tp=o=>o.is("html-attr")||o.is("table-attr"),fu=o=>o.childNodes.every(({type:t})=>hp.has(t)),Jn=(o,t)=>{let{top:e,left:r}=o.posFromIndex(t);return{line:e,character:r}},yu=(o,t,e)=>({start:Jn(o,t),end:Jn(o,e)}),cr=o=>{let{top:t,left:e,height:r,width:n}=o.getBoundingClientRect();return{start:{line:t,character:e},end:kr(t,e,r,n)}},ye=(o,t,e,{line:r,character:n},i,s)=>[...new Set(o)].map(a=>{var g;let l=(g=s==null?void 0:s(a))==null?void 0:g.description;return{label:a,kind:t,textEdit:{range:{start:{line:r,character:n-e.length},end:{line:r,character:n}},newText:a+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),mu=(o,t,{line:e,character:r})=>{let n=o.indexFromPos(e,r);return o.caretPositionFromIndex(n+Number(/\w/u.test(t.charAt(n))))},ku=(o,t,e)=>{let{type:r,parentNode:n={}}=o,{name:i,tag:s}=n;return r==="attr-value"&&t.has(s)&&e.has(i)?o.toString().trim():NaN},zn=o=>ku(o,gp,cp),Vn=o=>ku(o,pp,fp),tn=(o,t)=>{let e=o==null?void 0:o.getAttr(t);return e!==!0&&e||!1},Hi=o=>{let{type:t,name:e,parentNode:r}=o;switch(t){case"heading":return o.level;case"heading-title":return r.level;case"parameter-key":return`${r.parentNode.name}|${r.name}`;case"ext":case"html":case"image-parameter":return e;default:return r.name}},hu=(o,t,e=!1)=>({range:yu(o,...t.range),newText:t.text,title:`${e?"Fix":"Suggestion"}: ${t.desc}`,fix:e}),yp=(o,t)=>{let{lintConfig:e}=v,{rules:r,fix:n,computeEditInfo:i}=e;if(e.fix=!0,e.computeEditInfo=!1,t){e.rules=void 0;for(let a of Dt)e.rules[a]=a===t?r[a]:0}let{output:s}=o.lint();return e.fix=n,e.computeEditInfo=i,t&&(e.rules=r),s===void 0?[]:[{range:cr(o),newText:s}]},bu=async(o,t,e,r=v.getConfig())=>{let n=typeof setImmediate=="function"?setImmediate:setTimeout,{running:i}=J;J.running=!0;let{internal:s}=v;v.internal=!0;let a=()=>{J.running=i,v.internal=s},l=new $(xr(o),r);l.type="root";let g=0;try{await new Promise(u=>{let d=()=>{t()===o?(g++,n(p,0)):u()},p=()=>{g===12?(l.afterBuild(),u()):(l[g===11?"build":"parseOnce"](g,e),d())};n(p,0)})}catch(u){throw a(),u}return a(),l},Co=class{constructor(t){w(this,H);w(this,Ee);w(this,jt);w(this,Tt);w(this,yt);w(this,fr);w(this,Xn);w(this,nn);w(this,sn);w(this,mr);ge(this,"include",!0);ge(this,"config");ge(this,"data");xu.set(t,this),Object.defineProperties(this,{config:{enumerable:!1},data:{enumerable:!1}})}destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(t,e,r=!0){let n=await C(this,H,qe).call(this,e);return n.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:a}=i;return s!=="attr-value"&&!fu(i)?[]:a.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:g}=l,u=na(g,r).filter(([,,,p])=>p);if(u.length===0)return[];let d=l.getAbsoluteIndex();return u.map(([p,m,c])=>{let h=t(p);return h.length===4&&{color:{red:h[0]/255,green:h[1]/255,blue:h[2]/255,alpha:h[3]},range:yu(n,d+m,d+c)}}).filter(p=>p!==!1)})})}provideColorPresentations(t){let{color:{red:e,green:r,blue:n,alpha:i},range:s}=t,a=[e,r,n],l=i<1?`rgba(${a.map(g=>Math.round(g*255)).join()},${i})`:`#${a.map(ra).join("")}`;return[{label:l,textEdit:{range:s,newText:l}}]}async provideCompletionItems(t,e){var N,E,F,V,W,Y,D;let{re:r,allTags:n,functions:i,switches:s,jaSwitches:a,protocols:l,params:g,tags:u,ext:d}=C(this,H,vu).call(this),{line:p,character:m}=e,c=t.split(/\r?\n/u,p+1)[p],h=r.exec((N=c==null?void 0:c.slice(0,m))!=null?N:""),[,,b={},y={}]=this.config.doubleUnderscore;if((h==null?void 0:h[1])!==void 0){let I=h[1].startsWith("/");return ye(n,"Class",h[1].slice(I?1:0),e,I&&!(c!=null&&c.slice(m).trim().startsWith(">"))?">":"")}else if(h!=null&&h[4]||h!=null&&h[5]&&a.length>0){let I=h[5]!==void 0;return ye(I?a:s,"Constant",h[I?5:4],e,"",R=>{if(this.data)I||(R=R.slice(2,-2));else return;return R in b?R=b[R]:R in y&&(R=y[R]),C(this,H,No).call(this,R.toLowerCase())})}else if((h==null?void 0:h[6])!==void 0)return ye(l,"Reference",h[6],e);let x=await C(this,H,qe).call(this,t),T;if(h!=null&&h[2]){T=x.elementFromPoint(h.index+h[2].length-1,p);let I=(E=h[3])!=null?E:"";if(h[2]==="{{{")return ye(x.querySelectorAll("arg").filter(Q=>Q.name&&Q!==T).map(({name:Q})=>Q),"Variable",I,e);let[R,ee]=this.config.parserFunction,oe=c.charAt(m),xe=I.startsWith(":"),X=xe?I.slice(1).trimStart():I;if(h[2]==="[[")return ye(x.querySelectorAll("link,file,category,redirect-target").filter(Q=>Q!==T).map(({name:Q})=>Q),"Folder",X,e);let de=i;return oe===":"?de=i.filter(Q=>!Q.endsWith(":")):oe===":"&&(de=i.filter(Q=>Q.endsWith(":")).map(Q=>Q.slice(0,-1))),[...ye(de,"Function",I,e,"",Q=>{if(this.data)Q in R?Q=R[Q]:Q in ee&&(Q=ee[Q]);else return;return C(this,H,rn).call(this,Q.toLowerCase())}),...I.startsWith("#")?[]:ye(x.querySelectorAll("template").filter(Q=>Q!==T).map(Q=>{let{name:kt}=Q;if(xe)return kt;let{ns:on}=Q.getAttribute("title");return on===0?`:${kt}`:on===10?kt.slice(9):kt}),"Folder",X,e)]}let k,A;if((h==null?void 0:h[8])===void 0&&(T=x.elementFromPoint(m,p),{type:k,parentNode:A}=T),(h==null?void 0:h[7])!==void 0||k==="image-parameter"){let I=x.indexFromPos(p,m),R=(V=(F=h==null?void 0:h[7])==null?void 0:F.trimStart())!=null?V:f(this,Ee).slice(T.getAbsoluteIndex(),I).trimStart(),ee=f(this,Ee)[I]==="=";return[...ye(g,"Property",R,e).filter(({label:oe})=>!ee||!/[= ]$/u.test(oe)),...ye(x.querySelectorAll("image-parameter#width").filter(oe=>oe!==T).map(oe=>oe.text()),"Unit",R,e)]}else if((h==null?void 0:h[8])!==void 0||k==="attr-key"){let I=(Y=(W=h==null?void 0:h[8])==null?void 0:W.toLowerCase())!=null?Y:A.tag,R=(D=h==null?void 0:h[10])!=null?D:T.toString().slice(0,m-x.posFromIndex(T.getAbsoluteIndex()).left);if(!u.has(I))return;let ee=yi[I],oe=ki[I],xe=oe&&ye(oe,"Field",R,e);return d.includes(I)&&!ee?xe:[...xe!=null?xe:[],...I==="meta"||I==="link"?[]:ye(Ti,"Property",R,e),...ee?ye(ee,"Property",R,e):[],...ye(["data-"],"Variable",R,e),...ye(["xmlns:"],"Interface",R,e)]}else if(k==="parameter-key"||k==="parameter-value"&&A.anon){let I=A.parentNode,{type:R,name:ee}=I;if(R==="magic-word"&&ee!=="invoke")return;let oe=f(this,Ee).slice(T.getAbsoluteIndex(),x.indexFromPos(p,m)).trimStart(),{module:xe,function:X}=I;return oe?ye(x.querySelectorAll("parameter").filter(de=>de===A||de.anon||de.parentNode.type!==R||de.parentNode.name!==ee?!1:R==="template"?!0:de.parentNode.module===xe&&de.parentNode.function===X).map(({name:de})=>de),"Variable",oe,e,k==="parameter-value"?"=":""):void 0}else if(k==="param-line"){let I=f(this,Ee).slice(T.getAbsoluteIndex(),x.indexFromPos(p,m)).trimStart();return/^[a-z]+$/iu.test(I)?ye(vi[T.name],"Property",I,e):void 0}else if(cu(T)&&Tp(A)){let I=di(A.tag,A.name);if(I.length===0)return;let R=f(this,Ee).slice(T.getAbsoluteIndex(),x.indexFromPos(p,m)).trimStart();return ye(I,"Value",R,e)}}async provideDiagnostics(t,e=!0){let r=await C(this,H,qe).call(this,t),{lintConfig:n}=v,i=n.fix;n.fix=!1;let s=r.lint();return n.fix=i,[(e?s:s.filter(({severity:u})=>u==="error")).map(({startLine:u,startCol:d,endLine:p,endCol:m,severity:c,rule:h,message:b,fix:y,suggestions:x})=>({range:{start:{line:u,character:d},end:{line:p,character:m}},severity:c==="error"?1:2,source:"WikiLint",code:h,message:b,data:[...y?[hu(r,y,!0)]:[],...x?x.map(T=>hu(r,T)):[]]})),[],[]].flat(2)}resolveCodeAction(t){if(t.kind!=="source.fixAll")return t;let{rule:e}=t.data;return{...t,edit:{changes:{"":yp(f(this,fr),e)}}}}async provideFoldingRanges(t){let e=await C(this,H,qe).call(this,t),{length:r}=e.getLines(),n=[],i=new Array(6),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let a of[...s].reverse())a.getRelativeIndex();for(let a of s){let{offsetHeight:l}=a;if(a.type==="heading-title"||l>2){let{top:g}=e.posFromIndex(a.getAbsoluteIndex());if(a.type==="heading-title"){let{level:u}=a.parentNode;for(let d=u-1;d<6;d++){let p=i[d];p!==void 0&&p<g-1&&n.push({startLine:p,endLine:g-1,kind:"region"}),i[d]=void 0}i[u-1]=g+l-1}else n.push({startLine:g,endLine:g+l-2,kind:"region"})}}for(let a of i)a!==void 0&&a<r-1&&n.push({startLine:a,endLine:r-1,kind:"region"});return n}async provideLinks(t){var s;(s=this.config)!=null||(this.config=v.getConfig());let{articlePath:e,protocol:r}=this.config,n=e==null?void 0:e.includes("//"),i=xp(r);return(await C(this,H,qe).call(this,t)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value${n?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""},image-parameter#link,image-parameter#manualthumb`).reverse().map(a=>{let l;a.is("magic-word")?({name:l}=a,a=a.childNodes[1].lastChild):a.is("image-parameter")&&({name:l}=a);let{type:g,parentNode:u,firstChild:d,lastChild:p,childNodes:m,length:c}=a,{tag:h}=u;if(l!=null||(l=u.name),!(g!=="attr-value"||l==="cite"&&["blockquote","del","ins","q"].includes(h)||l==="src"&&["templatestyles","img"].includes(h)||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||!fu(a))return!1;let b=m.filter(y=>y.type==="text").map(({data:y})=>y).join("").trim();if(!b)return!1;try{if(a.is("magic-link")||a.is("ext-link-url")||a.is("free-ext-link"))b=a.getUrl(e);else if(g==="link-target"&&(u.is("link")||u.is("redirect-target")||u.is("category"))){if(/^(?:\.\.)?\//u.test(b))return!1;b=u.link.getUrl(e)}else if(g==="link-target"||g==="template-name")b=u.getAttribute("title").getUrl(e);else if(["invoke-module","parameter-value"].includes(g)||g==="attr-value"&&(l==="src"&&h==="templatestyles"||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||g==="image-parameter"&&(l==="manualthumb"||!i.test(b))){if(!n||b.startsWith("/"))return!1;g==="image-parameter"&&l==="manualthumb"||g==="parameter-value"&&l==="filepath"||g==="attr-value"&&h==="phonos"?b=`File:${b}`:g==="parameter-value"?b=`Widget:${b}`:g==="invoke-module"&&(b=`Module:${b}`);let y=v.normalizeTitle(b,g==="attr-value"?10:0,!1,this.config,{temporary:!0});if(!y.valid)return!1;b=y.getUrl()}if(typeof b=="string"&&b.startsWith("//")&&(b=`https:${b}`),b=new URL(b).href,g==="image-parameter"){let y=d.getBoundingClientRect(),{top:x,left:T,height:k,width:A}=c===1?y:p.getBoundingClientRect();return{range:{start:{line:y.top,character:y.left},end:kr(x,T,k,A)},target:b}}return{range:cr(a),target:b}}catch{return!1}}).filter(a=>a!==!1)}async provideReferences(t,e){let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=mu(r,f(this,Ee),e),s=n.type==="text"?n.parentNode:n,a=i===0&&(s.is("ext-attr-dirty")||s.is("html-attr-dirty"))?s.parentNode.parentNode:s,{type:l}=a,g=zn(a),u=Vn(a);if(!g&&!u&&!mp.has(l))return;let d=Hi(a),p=r.querySelectorAll(l==="heading-title"?"heading":l).filter(m=>l==="attr-value"?zn(m)===g||Vn(m)===u:Hi(m)===d).reverse().map(m=>({range:cr(m.type==="parameter-key"?m.parentNode:m)}));return p.length===0?void 0:p}async provideDefinition(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line),i=n.is("ext")&&n.name==="ref"?n:n.closest("ext#ref"),s=tn(i,"name");if(!s)return;let a=tn(i,"group"),l=r.querySelectorAll("ext#ref").filter(g=>g.innerText&&tn(g,"name")===s&&tn(g,"group")===a).reverse().map(({lastChild:g})=>({range:cr(g)}));return l.length===0?void 0:l}async resolveRenameLocation(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line),{type:i}=n,s=zn(n),a=Vn(n);return!s&&!a&&(!Tu.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(n.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(n.parentNode.type))?void 0:cr(n)}async provideRenameEdits(t,e,r){let n=await C(this,H,qe).call(this,t),i=n.elementFromPoint(e.character,e.line),{type:s}=i,a=zn(i),l=a&&tn(i.parentNode.parentNode,"group"),g=Vn(i),u=Hi(i),d=n.querySelectorAll(s).filter(p=>{let{type:m}=p.parentNode;return s==="link-target"&&m!=="link"&&m!=="redirect-target"?!1:s==="attr-value"?Vn(p)===g||zn(p)===a&&tn(p.parentNode.parentNode,"group")===l:Hi(p)===u});return d.length===0?void 0:{changes:{"":d.reverse().map(p=>({range:cr(p),newText:r}))}}}async provideHover(t,e){if(!this.data)return;let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=mu(r,f(this,Ee),e);n.type==="text"&&(i+=n.getRelativeIndex(),n=n.parentNode);let{type:s,parentNode:a,length:l,name:g}=n,u,d,p,m;if(n.is("double-underscore")&&i>0)u=C(this,H,No).call(this,n.name);else if(s==="magic-word-name")u=C(this,H,rn).call(this,a.name),d=n.text().trim(),p=a.getAttribute("colon");else if(n.is("magic-word")&&!n.modifier&&l===1&&(i>0||r.posFromIndex(n.getAbsoluteIndex()).left===e.character))u=C(this,H,rn).call(this,g),d=n.firstChild.text().trim(),p=n.getAttribute("colon");else if((n.is("magic-word")||n.is("template"))&&n.modifier&&i>=2&&n.getRelativeIndex(0)>i&&(d=n.modifier.trim().slice(0,-1),u=C(this,H,rn).call(this,d.toLowerCase()),p=":",u)){let c=n.getAbsoluteIndex();m={start:Jn(r,c+2),end:Jn(r,c+n.modifier.trimEnd().length+1)}}return u&&{contents:{kind:"markdown",value:(u.signatures?`${u.signatures.map(c=>`- **{{ ${d}${c.length===0?"**":`${p}** `}${c.map(({label:h,const:b})=>b?h:`*${h}*`).join(" **|** ")} **}}**`).join(`
|
|
35
|
+
`))},su=function(){if(f(this,ne).variants.length>0){let{parseConverter:e}=(Vd(),K(zd));this.setText(e(this.firstChild.toString(),f(this,ne),f(this,ie)))}};$=So});var J,$i,gd,Fa,zt,Ca,pd,Ae=L(()=>{"use strict";J={running:!1,run(o,t){let{running:e}=this;this.running=!0;let r=t==null?void 0:t.internal;t&&(t.internal=!0);let n=()=>{this.running=e,t&&(t.internal=r)};try{let{Token:i}=(z(),K(Mi)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,t){let{internal:e}=t;t.internal=!0;let r=o();return t.internal=e,r},rev:0},$i=o=>t=>t.type===o,gd=({type:o})=>o==="tr"||o==="table-syntax",Fa=o=>o==="redirect-target"||o==="link",zt=(o,t,e,r=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=r):i=Array.prototype.splice.apply(n,[t,e,...r]);for(let l=0;l<r.length;l++){let g=r[l];g.setAttribute("parentNode",o),g.setAttribute("nextSibling",n[t+l+1]),g.setAttribute("previousSibling",n[t+l-1])}return(s=n[t-1])==null||s.setAttribute("nextSibling",n[t]),(a=n[t+r.length])==null||a.setAttribute("previousSibling",n[t+r.length-1]),n===r&&o.setAttribute("childNodes",n),i},Ca=(o,t)=>{let e=o.toLowerCase(),[r,n]=t,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(r,e)&&r[e]]},pd=(o,t)=>Array.from({length:o},(e,r)=>t(r))});var Dn,lp,ou,au,dp,lu,up,wo,Zr,Mn,du=L(()=>{"use strict";ti();Dn=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),lp={"arg-in-ext":1,"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-json":[2,{duplicate:1}],"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"syntax-like":[2,{}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},ou={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},au=o=>Dn.has(o),dp=o=>au(o)||Array.isArray(o)&&au(o[0])&&(o.length===1||typeof o[1]=="object"),lu=(o,t,e)=>{if(!Dt.includes(t))throw new RangeError(`Unknown lint rule: ${t}`);if(e===void 0)return!1;if(dp(e))return o[t]=e,!0;throw new RangeError(`Invalid lint config for ${t}: ${JSON.stringify(e)}`)},up=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),wo=class{constructor(t){if(Object.assign(this,up(lp)),!!t)for(let[e,r]of Object.entries(t))lu(this,e,r)}getSeverity(t,e){var n,i;let r=this[t];return typeof r!="object"?Dn.get(r):e&&(i=Dn.get((n=r[1])==null?void 0:n[e]))!=null?i:Dn.get(r[0])}},Mn=class{constructor(t){w(this,Zr);if(Object.assign(this,ou),t&&!("rules"in t)&&Object.keys(t).some(e=>Dt.includes(e)))this.rules=t;else{let{rules:e,...r}=t!=null?t:{};this.rules=e;for(let[n,i]of Object.entries(r))i!==void 0&&Object.prototype.hasOwnProperty.call(ou,n)&&(this[n]=i)}}get rules(){return f(this,Zr)}set rules(t){S(this,Zr,new Proxy(new wo(t),{set:lu,deleteProperty(){return!1}}))}getSeverity(t,e){return f(this,Zr).getSeverity(t,e)}};Zr=new WeakMap});var uu,Hn,Gn,Oe,en,pr,Ui,gu,Un,pu=L(()=>{"use strict";He();ae();uu=o=>{let[,{length:t},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[t/3,e]},Un=class{constructor(t,e,r,{temporary:n,decode:i,selfLink:s,page:a}={}){w(this,Ui);w(this,Hn);w(this,Gn);w(this,Oe);w(this,en);w(this,pr);ge(this,"page");ge(this,"valid");ge(this,"encoded",!1);this.page=a;let l=t.trim(),g=l.startsWith("../");if(i&&t.includes("%"))try{let m=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(t);t=Ht(t),this.encoded=m}catch{}if(t=Mt(t).replace(/[_ ]+/gu," ").trim(),g||a&&l.startsWith("/"))S(this,en,0);else{let m=e;t.startsWith(":")&&(m=0,t=t.slice(1).trim());let c=t.split(":");if(c.length>1){let h=nt(c[0]),b=Object.prototype.hasOwnProperty.call(r.nsid,h)&&r.nsid[h];b&&(m=b,t=c.slice(1).join(":").trim())}S(this,en,m)}let u=t.indexOf("#");if(u!==-1){let m=t.slice(u).trim().slice(1);if(m.includes("%"))try{m=Ht(m)}catch{}S(this,pr,m.replace(/ /gu,"_")),t=t.slice(0,u).trim()}let[d,p]=g?uu(t):[0,t];this.valid=!!(t||s&&this.ns===0&&f(this,pr)!==void 0)&&Mt(t)===t&&(d===0||a===void 0||a.split("/",d+1).length>d)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(p),this.main=t,S(this,Gn,r.namespaces),S(this,Oe,r.articlePath||"/wiki/$1"),f(this,Oe).includes("$1")||S(this,Oe,f(this,Oe)+`${f(this,Oe).endsWith("/")?"":"/"}$1`),n||Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}})}get ns(){return f(this,en)}get fragment(){return f(this,pr)}get main(){return f(this,Hn)}set main(t){t=t.replace(/_/gu," ").trim(),S(this,Hn,t&&t[0].toUpperCase()+t.slice(1))}get prefix(){let t=f(this,Gn)[this.ns];return t+(t&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:t}=this,e=t.lastIndexOf(".");return e===-1?void 0:t.slice(e+1).toLowerCase()}getRedirection(){let{prefix:t}=this,e=t;return C(this,Ui,gu).call(this,e)}setFragment(t){S(this,pr,t)}getUrl(t){{typeof t=="string"&&(S(this,Oe,t),f(this,Oe).includes("$1")||S(this,Oe,f(this,Oe)+`${f(this,Oe).endsWith("/")?"":"/"}$1`));let{title:e,fragment:r}=this;return e?f(this,Oe).replace("$1",encodeURIComponent(e)+(r?`#${encodeURIComponent(r)}`:"")):r===void 0?"":`#${encodeURIComponent(r)}`}throw new Error("Title.getUrl method is only available in the LSP version!")}};Hn=new WeakMap,Gn=new WeakMap,Oe=new WeakMap,en=new WeakMap,pr=new WeakMap,Ui=new WeakSet,gu=function(t){var r,n;let e=(t+this.main).replace(/ /gu,"_");if(e.startsWith("/"))e=((r=this.page)!=null?r:"")+e.replace(/(.)\/$/u,"$1");else if(e.startsWith("../")&&((n=this.page)!=null&&n.includes("/"))){let[i,s]=uu(e),a=this.page.split("/");a.length>i&&(e=a.slice(0,-i).join("/")+(s&&"/")+s)}return[!1,e]}});var Au={};re(Au,{LanguageService:()=>Co,tasks:()=>xu});var xu,gp,pp,cp,fp,Tu,mp,hp,bp,xp,cu,Tp,fu,Jn,yu,cr,ye,mu,ku,zn,Vn,tn,Hi,hu,yp,bu,Ee,jt,Tt,yt,fr,Xn,nn,sn,mr,H,Qn,qe,Lo,Eo,$o,vu,No,rn,Co,Su=L(()=>{"use strict";He();co();ti();Ai();G();ae();Ae();M();z();xu=new WeakMap,gp=new Set(["ref"]),pp=new Set(["ref","references"]),cp=new Set(["name","follow"]),fp=new Set(["group"]),Tu=new Set(["arg-name","template-name","link-target","parameter-key"]),mp=new Set(["ext","html","attr-key","image-parameter","heading-title","heading","magic-word-name",...Tu]),hp=new Set(["text","comment","noinclude","include"]),bp=["ext","html","table"].map(o=>`${o}-attr#style`).join(),xp=Be(o=>new RegExp(`^(?:${o}|//)`,"iu")),cu=({type:o,parentNode:t,length:e,firstChild:r},n)=>o==="attr-value"&&e===1&&r.type==="text"&&(!n||t.name==="style"),Tp=o=>o.is("html-attr")||o.is("table-attr"),fu=o=>o.childNodes.every(({type:t})=>hp.has(t)),Jn=(o,t)=>{let{top:e,left:r}=o.posFromIndex(t);return{line:e,character:r}},yu=(o,t,e)=>({start:Jn(o,t),end:Jn(o,e)}),cr=o=>{let{top:t,left:e,height:r,width:n}=o.getBoundingClientRect();return{start:{line:t,character:e},end:kr(t,e,r,n)}},ye=(o,t,e,{line:r,character:n},i,s)=>[...new Set(o)].map(a=>{var g;let l=(g=s==null?void 0:s(a))==null?void 0:g.description;return{label:a,kind:t,textEdit:{range:{start:{line:r,character:n-e.length},end:{line:r,character:n}},newText:a+(i!=null?i:"")},...l&&{documentation:{kind:"markdown",value:l}}}}),mu=(o,t,{line:e,character:r})=>{let n=o.indexFromPos(e,r);return o.caretPositionFromIndex(n+Number(/\w/u.test(t.charAt(n))))},ku=(o,t,e)=>{let{type:r,parentNode:n={}}=o,{name:i,tag:s}=n;return r==="attr-value"&&t.has(s)&&e.has(i)?o.toString().trim():NaN},zn=o=>ku(o,gp,cp),Vn=o=>ku(o,pp,fp),tn=(o,t)=>{let e=o==null?void 0:o.getAttr(t);return e!==!0&&e||!1},Hi=o=>{let{type:t,name:e,parentNode:r}=o;switch(t){case"heading":return o.level;case"heading-title":return r.level;case"parameter-key":return`${r.parentNode.name}|${r.name}`;case"ext":case"html":case"image-parameter":return e;default:return r.name}},hu=(o,t,e=!1)=>({range:yu(o,...t.range),newText:t.text,title:`${e?"Fix":"Suggestion"}: ${t.desc}`,fix:e}),yp=(o,t)=>{let{lintConfig:e}=v,{rules:r,fix:n,computeEditInfo:i}=e;if(e.fix=!0,e.computeEditInfo=!1,t){e.rules=void 0;for(let a of Dt)e.rules[a]=a===t?r[a]:0}let{output:s}=o.lint();return e.fix=n,e.computeEditInfo=i,t&&(e.rules=r),s===void 0?[]:[{range:cr(o),newText:s}]},bu=async(o,t,e,r=v.getConfig())=>{let n=typeof setImmediate=="function"?setImmediate:setTimeout,{running:i}=J;J.running=!0;let{internal:s}=v;v.internal=!0;let a=()=>{J.running=i,v.internal=s},l=new $(xr(o),r);l.type="root";let g=0;try{await new Promise(u=>{let d=()=>{t()===o?(g++,n(p,0)):u()},p=()=>{g===12?(l.afterBuild(),u()):(l[g===11?"build":"parseOnce"](g,e),d())};n(p,0)})}catch(u){throw a(),u}return a(),l},Co=class{constructor(t){w(this,H);w(this,Ee);w(this,jt);w(this,Tt);w(this,yt);w(this,fr);w(this,Xn);w(this,nn);w(this,sn);w(this,mr);ge(this,"include",!0);ge(this,"config");ge(this,"data");xu.set(t,this),Object.defineProperties(this,{config:{enumerable:!1},data:{enumerable:!1}})}destroy(){Object.setPrototypeOf(this,null)}async provideDocumentColors(t,e,r=!0){let n=await C(this,H,qe).call(this,e);return n.querySelectorAll("attr-value,parameter-value,arg-default").reverse().flatMap(i=>{let{type:s,childNodes:a}=i;return s!=="attr-value"&&!fu(i)?[]:a.filter(l=>l.type==="text").reverse().flatMap(l=>{let{data:g}=l,u=na(g,r).filter(([,,,p])=>p);if(u.length===0)return[];let d=l.getAbsoluteIndex();return u.map(([p,m,c])=>{let h=t(p);return h.length===4&&{color:{red:h[0]/255,green:h[1]/255,blue:h[2]/255,alpha:h[3]},range:yu(n,d+m,d+c)}}).filter(p=>p!==!1)})})}provideColorPresentations(t){let{color:{red:e,green:r,blue:n,alpha:i},range:s}=t,a=[e,r,n],l=i<1?`rgba(${a.map(g=>Math.round(g*255)).join()},${i})`:`#${a.map(ra).join("")}`;return[{label:l,textEdit:{range:s,newText:l}}]}async provideCompletionItems(t,e){var N,E,F,V,W,Y,D;let{re:r,allTags:n,functions:i,switches:s,jaSwitches:a,protocols:l,params:g,tags:u,ext:d}=C(this,H,vu).call(this),{line:p,character:m}=e,c=t.split(/\r?\n/u,p+1)[p],h=r.exec((N=c==null?void 0:c.slice(0,m))!=null?N:""),[,,b={},y={}]=this.config.doubleUnderscore;if((h==null?void 0:h[1])!==void 0){let I=h[1].startsWith("/");return ye(n,"Class",h[1].slice(I?1:0),e,I&&!(c!=null&&c.slice(m).trim().startsWith(">"))?">":"")}else if(h!=null&&h[4]||h!=null&&h[5]&&a.length>0){let I=h[5]!==void 0;return ye(I?a:s,"Constant",h[I?5:4],e,"",R=>{if(this.data)I||(R=R.slice(2,-2));else return;return R in b?R=b[R]:R in y&&(R=y[R]),C(this,H,No).call(this,R.toLowerCase())})}else if((h==null?void 0:h[6])!==void 0)return ye(l,"Reference",h[6],e);let x=await C(this,H,qe).call(this,t),T;if(h!=null&&h[2]){T=x.elementFromPoint(h.index+h[2].length-1,p);let I=(E=h[3])!=null?E:"";if(h[2]==="{{{")return ye(x.querySelectorAll("arg").filter(Q=>Q.name&&Q!==T).map(({name:Q})=>Q),"Variable",I,e);let[R,ee]=this.config.parserFunction,oe=c.charAt(m),xe=I.startsWith(":"),X=xe?I.slice(1).trimStart():I;if(h[2]==="[[")return ye(x.querySelectorAll("link,file,category,redirect-target").filter(Q=>Q!==T).map(({name:Q})=>Q),"Folder",X,e);let de=i;return oe===":"?de=i.filter(Q=>!Q.endsWith(":")):oe===":"&&(de=i.filter(Q=>Q.endsWith(":")).map(Q=>Q.slice(0,-1))),[...ye(de,"Function",I,e,"",Q=>{if(this.data)Q in R?Q=R[Q]:Q in ee&&(Q=ee[Q]);else return;return C(this,H,rn).call(this,Q.toLowerCase())}),...I.startsWith("#")?[]:ye(x.querySelectorAll("template").filter(Q=>Q!==T).map(Q=>{let{name:kt}=Q;if(xe)return kt;let{ns:on}=Q.getAttribute("title");return on===0?`:${kt}`:on===10?kt.slice(9):kt}),"Folder",X,e)]}let k,A;if((h==null?void 0:h[8])===void 0){if(T=x.elementFromPoint(m,p),!T)return;({type:k,parentNode:A}=T)}if((h==null?void 0:h[7])!==void 0||k==="image-parameter"){let I=x.indexFromPos(p,m),R=(V=(F=h==null?void 0:h[7])==null?void 0:F.trimStart())!=null?V:f(this,Ee).slice(T.getAbsoluteIndex(),I).trimStart(),ee=f(this,Ee)[I]==="=";return[...ye(g,"Property",R,e).filter(({label:oe})=>!ee||!/[= ]$/u.test(oe)),...ye(x.querySelectorAll("image-parameter#width").filter(oe=>oe!==T).map(oe=>oe.text()),"Unit",R,e)]}else if((h==null?void 0:h[8])!==void 0||k==="attr-key"){let I=(Y=(W=h==null?void 0:h[8])==null?void 0:W.toLowerCase())!=null?Y:A.tag,R=(D=h==null?void 0:h[10])!=null?D:T.toString().slice(0,m-x.posFromIndex(T.getAbsoluteIndex()).left);if(!u.has(I))return;let ee=yi[I],oe=ki[I],xe=oe&&ye(oe,"Field",R,e);return d.includes(I)&&!ee?xe:[...xe!=null?xe:[],...I==="meta"||I==="link"?[]:ye(Ti,"Property",R,e),...ee?ye(ee,"Property",R,e):[],...ye(["data-"],"Variable",R,e),...ye(["xmlns:"],"Interface",R,e)]}else if(k==="parameter-key"||k==="parameter-value"&&A.anon){let I=A.parentNode,{type:R,name:ee}=I;if(R==="magic-word"&&ee!=="invoke")return;let oe=f(this,Ee).slice(T.getAbsoluteIndex(),x.indexFromPos(p,m)).trimStart(),{module:xe,function:X}=I;return oe?ye(x.querySelectorAll("parameter").filter(de=>de===A||de.anon||de.parentNode.type!==R||de.parentNode.name!==ee?!1:R==="template"?!0:de.parentNode.module===xe&&de.parentNode.function===X).map(({name:de})=>de),"Variable",oe,e,k==="parameter-value"?"=":""):void 0}else if(k==="param-line"){let I=f(this,Ee).slice(T.getAbsoluteIndex(),x.indexFromPos(p,m)).trimStart();return/^[a-z]+$/iu.test(I)?ye(vi[T.name],"Property",I,e):void 0}else if(cu(T)&&Tp(A)){let I=di(A.tag,A.name);if(I.length===0)return;let R=f(this,Ee).slice(T.getAbsoluteIndex(),x.indexFromPos(p,m)).trimStart();return ye(I,"Value",R,e)}}async provideDiagnostics(t,e=!0){let r=await C(this,H,qe).call(this,t),{lintConfig:n}=v,i=n.fix;n.fix=!1;let s=r.lint();return n.fix=i,[(e?s:s.filter(({severity:u})=>u==="error")).map(({startLine:u,startCol:d,endLine:p,endCol:m,severity:c,rule:h,message:b,fix:y,suggestions:x})=>({range:{start:{line:u,character:d},end:{line:p,character:m}},severity:c==="error"?1:2,source:"WikiLint",code:h,message:b,data:[...y?[hu(r,y,!0)]:[],...x?x.map(T=>hu(r,T)):[]]})),[],[]].flat(2)}resolveCodeAction(t){if(t.kind!=="source.fixAll")return t;let{rule:e}=t.data;return{...t,edit:{changes:{"":yp(f(this,fr),e)}}}}async provideFoldingRanges(t){let e=await C(this,H,qe).call(this,t),{length:r}=e.getLines(),n=[],i=new Array(6),s=e.querySelectorAll("heading-title,table,template,magic-word");for(let a of[...s].reverse())a.getRelativeIndex();for(let a of s){let{offsetHeight:l}=a;if(a.type==="heading-title"||l>2){let{top:g}=e.posFromIndex(a.getAbsoluteIndex());if(a.type==="heading-title"){let{level:u}=a.parentNode;for(let d=u-1;d<6;d++){let p=i[d];p!==void 0&&p<g-1&&n.push({startLine:p,endLine:g-1,kind:"region"}),i[d]=void 0}i[u-1]=g+l-1}else n.push({startLine:g,endLine:g+l-2,kind:"region"})}}for(let a of i)a!==void 0&&a<r-1&&n.push({startLine:a,endLine:r-1,kind:"region"});return n}async provideLinks(t){var s;(s=this.config)!=null||(this.config=v.getConfig());let{articlePath:e,protocol:r}=this.config,n=e==null?void 0:e.includes("//"),i=xp(r);return(await C(this,H,qe).call(this,t)).querySelectorAll(`magic-link,ext-link-url,free-ext-link,attr-value${n?",link-target,template-name,invoke-module,magic-word#filepath,magic-word#widget":""},image-parameter#link,image-parameter#manualthumb`).reverse().map(a=>{let l;a.is("magic-word")?({name:l}=a,a=a.childNodes[1].lastChild):a.is("image-parameter")&&({name:l}=a);let{type:g,parentNode:u,firstChild:d,lastChild:p,childNodes:m,length:c}=a,{tag:h}=u;if(l!=null||(l=u.name),!(g!=="attr-value"||l==="cite"&&["blockquote","del","ins","q"].includes(h)||l==="src"&&["templatestyles","img"].includes(h)||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||!fu(a))return!1;let b=m.filter(y=>y.type==="text").map(({data:y})=>y).join("").trim();if(!b)return!1;try{if(a.is("magic-link")||a.is("ext-link-url")||a.is("free-ext-link"))b=a.getUrl(e);else if(g==="link-target"&&(u.is("link")||u.is("redirect-target")||u.is("category"))){if(/^(?:\.\.)?\//u.test(b))return!1;b=u.link.getUrl(e)}else if(g==="link-target"||g==="template-name")b=u.getAttribute("title").getUrl(e);else if(["invoke-module","parameter-value"].includes(g)||g==="attr-value"&&(l==="src"&&h==="templatestyles"||l==="templatename"&&h==="rss"||l==="file"&&h==="phonos")||g==="image-parameter"&&(l==="manualthumb"||!i.test(b))){if(!n||b.startsWith("/"))return!1;g==="image-parameter"&&l==="manualthumb"||g==="parameter-value"&&l==="filepath"||g==="attr-value"&&h==="phonos"?b=`File:${b}`:g==="parameter-value"?b=`Widget:${b}`:g==="invoke-module"&&(b=`Module:${b}`);let y=v.normalizeTitle(b,g==="attr-value"?10:0,!1,this.config,{temporary:!0});if(!y.valid)return!1;b=y.getUrl()}if(typeof b=="string"&&b.startsWith("//")&&(b=`https:${b}`),b=new URL(b).href,g==="image-parameter"){let y=d.getBoundingClientRect(),{top:x,left:T,height:k,width:A}=c===1?y:p.getBoundingClientRect();return{range:{start:{line:y.top,character:y.left},end:kr(x,T,k,A)},target:b}}return{range:cr(a),target:b}}catch{return!1}}).filter(a=>a!==!1)}async provideReferences(t,e){let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=mu(r,f(this,Ee),e),s=n.type==="text"?n.parentNode:n,a=i===0&&(s.is("ext-attr-dirty")||s.is("html-attr-dirty"))?s.parentNode.parentNode:s,{type:l}=a,g=zn(a),u=Vn(a);if(!g&&!u&&!mp.has(l))return;let d=Hi(a),p=r.querySelectorAll(l==="heading-title"?"heading":l).filter(m=>l==="attr-value"?zn(m)===g||Vn(m)===u:Hi(m)===d).reverse().map(m=>({range:cr(m.type==="parameter-key"?m.parentNode:m)}));return p.length===0?void 0:p}async provideDefinition(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line);if(!n)return;let i=n.is("ext")&&n.name==="ref"?n:n.closest("ext#ref"),s=tn(i,"name");if(!s)return;let a=tn(i,"group"),l=r.querySelectorAll("ext#ref").filter(g=>g.innerText&&tn(g,"name")===s&&tn(g,"group")===a).reverse().map(({lastChild:g})=>({range:cr(g)}));return l.length===0?void 0:l}async resolveRenameLocation(t,e){let r=await C(this,H,qe).call(this,t),n=r.elementFromPoint(e.character,e.line);if(!n)return;let{type:i}=n,s=zn(n),a=Vn(n);return!s&&!a&&(!Tu.has(i)||i==="parameter-key"&&/^[1-9]\d*$/u.test(n.parentNode.name)||i==="link-target"&&!["link","redirect-target"].includes(n.parentNode.type))?void 0:cr(n)}async provideRenameEdits(t,e,r){let n=await C(this,H,qe).call(this,t),i=n.elementFromPoint(e.character,e.line);if(!i)return;let{type:s}=i,a=zn(i),l=a&&tn(i.parentNode.parentNode,"group"),g=Vn(i),u=Hi(i),d=n.querySelectorAll(s).filter(p=>{let{type:m}=p.parentNode;return s==="link-target"&&m!=="link"&&m!=="redirect-target"?!1:s==="attr-value"?Vn(p)===g||zn(p)===a&&tn(p.parentNode.parentNode,"group")===l:Hi(p)===u});return d.length===0?void 0:{changes:{"":d.reverse().map(p=>({range:cr(p),newText:r}))}}}async provideHover(t,e){if(!this.data)return;let r=await C(this,H,qe).call(this,t),{offsetNode:n,offset:i}=mu(r,f(this,Ee),e);n.type==="text"&&(i+=n.getRelativeIndex(),n=n.parentNode);let{type:s,parentNode:a,length:l,name:g}=n,u,d,p,m;if(n.is("double-underscore")&&i>0)u=C(this,H,No).call(this,n.name);else if(s==="magic-word-name")u=C(this,H,rn).call(this,a.name),d=n.text().trim(),p=a.getAttribute("colon");else if(n.is("magic-word")&&!n.modifier&&l===1&&(i>0||r.posFromIndex(n.getAbsoluteIndex()).left===e.character))u=C(this,H,rn).call(this,g),d=n.firstChild.text().trim(),p=n.getAttribute("colon");else if((n.is("magic-word")||n.is("template"))&&n.modifier&&i>=2&&n.getRelativeIndex(0)>i&&(d=n.modifier.trim().slice(0,-1),u=C(this,H,rn).call(this,d.toLowerCase()),p=":",u)){let c=n.getAbsoluteIndex();m={start:Jn(r,c+2),end:Jn(r,c+n.modifier.trimEnd().length+1)}}return u&&{contents:{kind:"markdown",value:(u.signatures?`${u.signatures.map(c=>`- **{{ ${d}${c.length===0?"**":`${p}** `}${c.map(({label:h,const:b})=>b?h:`*${h}*`).join(" **|** ")} **}}**`).join(`
|
|
36
36
|
`)}
|
|
37
37
|
|
|
38
38
|
`:"")+u.description},range:m!=null?m:cr(n)}}async provideSignatureHelp(t,e){if(!this.data)return;let{line:r,character:n}=e,i=t.split(/\r?\n/u,r+1)[r],{lastChild:s}=await C(this,H,Eo).call(this,`${i.slice(0,n+/^[^{}<]*/u.exec(i.slice(n))[0].length)}}}`);if(!s.is("magic-word")||s.length===1)return;let{name:a,childNodes:l,firstChild:g}=s,u=C(this,H,rn).call(this,a);if(!(u!=null&&u.signatures))return;let d=l.length-1,p=u.signatures.filter(b=>{var y;return(b.length>=d||((y=b[b.length-1])==null?void 0:y.rest))&&b.every(({label:x,const:T},k)=>{var N;let A=T&&k<d&&((N=l[k+1])==null?void 0:N.text().trim());return!A||x.toLowerCase().includes(A.toLowerCase())})});if(p.length===0)return;let m=-1;for(let b=s.getAbsoluteIndex()+s.getAttribute("padding");m<d&&(b+=l[m+1].toString().length+1,!(b>n));m++);let c=g.text().trim(),h=s.getAttribute("colon");return{signatures:p.map(b=>({label:`{{${c}${b.length===0?"":h}${b.map(({label:y})=>y).join("|")}}}`,parameters:b.map(({label:y,const:x})=>({label:y,...x?{documentation:"Predefined parameter"}:void 0})),...b.length<d?{activeParameter:Math.min(m,b.length-1)}:void 0})),activeParameter:m}}async provideInlayHints(t){let e=await C(this,H,qe).call(this,t),r=[];for(let n of e.querySelectorAll("template,magic-word#invoke").reverse()){let{type:i,childNodes:s}=n;r=[...r,...s.slice(i==="template"?1:3).filter(({anon:a})=>a).reverse().map(a=>({position:Jn(e,a.getAbsoluteIndex()),label:`${a.name}=`,kind:2}))]}return r}querySelectorAll(t){return f(this,fr).querySelectorAll(t)}findStyleTokens(){return this.querySelectorAll(bp).filter(({lastChild:t})=>cu(t))}async provideRefactoringAction(t,e){let r,n;if(e){let{start:a,end:l}=e;if(a.line===l.line&&a.character===l.character)return[];r=t.split(/\r?\n/u,l.line+1),n=a.line===l.line?r[l.line].slice(a.character,l.character):`${r[a.line].slice(a.character)}
|
package/config/moegirl.json
CHANGED
package/data/ext/math.json
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"\\alpha",
|
|
8
8
|
"\\Alpha",
|
|
9
9
|
"\\amalg",
|
|
10
|
-
"\\and",
|
|
11
10
|
"\\And",
|
|
12
11
|
"\\angle",
|
|
13
12
|
"\\approx",
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
"\\backslash",
|
|
30
29
|
"\\bar",
|
|
31
30
|
"\\barwedge",
|
|
32
|
-
"\\Bbb",
|
|
33
31
|
"\\Bbbk",
|
|
34
32
|
"\\bcancel",
|
|
35
33
|
"\\because",
|
|
@@ -72,8 +70,8 @@
|
|
|
72
70
|
"\\blacktriangleleft",
|
|
73
71
|
"\\blacktriangleright",
|
|
74
72
|
"\\bmod",
|
|
75
|
-
"\\bold",
|
|
76
73
|
"\\boldsymbol",
|
|
74
|
+
"\\bond",
|
|
77
75
|
"\\bot",
|
|
78
76
|
"\\bowtie",
|
|
79
77
|
"\\Box",
|
|
@@ -86,7 +84,7 @@
|
|
|
86
84
|
"\\bullet",
|
|
87
85
|
"\\bumpeq",
|
|
88
86
|
"\\Bumpeq",
|
|
89
|
-
"\\
|
|
87
|
+
"\\ca",
|
|
90
88
|
"\\cal",
|
|
91
89
|
"\\cancel",
|
|
92
90
|
"\\cancelto",
|
|
@@ -94,6 +92,7 @@
|
|
|
94
92
|
"\\Cap",
|
|
95
93
|
"\\cdot",
|
|
96
94
|
"\\cdots",
|
|
95
|
+
"\\ce",
|
|
97
96
|
"\\centerdot",
|
|
98
97
|
"\\cfrac",
|
|
99
98
|
"\\check",
|
|
@@ -185,7 +184,6 @@
|
|
|
185
184
|
"\\emph",
|
|
186
185
|
"\\empty",
|
|
187
186
|
"\\emptyset",
|
|
188
|
-
"\\end",
|
|
189
187
|
"\\epsilon",
|
|
190
188
|
"\\Epsilon",
|
|
191
189
|
"\\eqcirc",
|
|
@@ -234,8 +232,6 @@
|
|
|
234
232
|
"\\gtrless",
|
|
235
233
|
"\\gtrsim",
|
|
236
234
|
"\\gvertneqq",
|
|
237
|
-
"\\H",
|
|
238
|
-
"\\hAar",
|
|
239
235
|
"\\harr",
|
|
240
236
|
"\\hArr",
|
|
241
237
|
"\\Harr",
|
|
@@ -442,7 +438,6 @@
|
|
|
442
438
|
"\\ominus",
|
|
443
439
|
"\\operatorname",
|
|
444
440
|
"\\oplus",
|
|
445
|
-
"\\or",
|
|
446
441
|
"\\oslash",
|
|
447
442
|
"\\otimes",
|
|
448
443
|
"\\over",
|
|
@@ -456,7 +451,6 @@
|
|
|
456
451
|
"\\P",
|
|
457
452
|
"\\pagecolor",
|
|
458
453
|
"\\parallel",
|
|
459
|
-
"\\part",
|
|
460
454
|
"\\partial",
|
|
461
455
|
"\\perp",
|
|
462
456
|
"\\phantom",
|
|
@@ -672,6 +666,7 @@
|
|
|
672
666
|
"\\vartriangleright",
|
|
673
667
|
"\\varUpsilon",
|
|
674
668
|
"\\varXi",
|
|
669
|
+
"\\vbox",
|
|
675
670
|
"\\vdash",
|
|
676
671
|
"\\vDash",
|
|
677
672
|
"\\Vdash",
|
package/data/ext/score.json
CHANGED
|
@@ -5,21 +5,18 @@
|
|
|
5
5
|
"\\accentus",
|
|
6
6
|
"\\accepts",
|
|
7
7
|
"\\acciaccatura",
|
|
8
|
-
"\\accidental",
|
|
9
8
|
"\\accidentalStyle",
|
|
10
9
|
"\\addChordShape",
|
|
11
10
|
"\\addInstrumentDefinition",
|
|
12
11
|
"\\addlyrics",
|
|
13
12
|
"\\addQuote",
|
|
14
13
|
"\\aeolian",
|
|
15
|
-
"\\after",
|
|
16
14
|
"\\afterGrace",
|
|
17
15
|
"\\aikenHeads",
|
|
18
16
|
"\\aikenHeadsMinor",
|
|
19
17
|
"\\aikenThinHeads",
|
|
20
18
|
"\\aikenThinHeadsMinor",
|
|
21
19
|
"\\alias",
|
|
22
|
-
"\\align-on-other",
|
|
23
20
|
"\\allowPageTurn",
|
|
24
21
|
"\\allowVoltaHook",
|
|
25
22
|
"\\alterBroken",
|
|
@@ -72,8 +69,6 @@
|
|
|
72
69
|
"\\beam",
|
|
73
70
|
"\\beamExceptions",
|
|
74
71
|
"\\bendAfter",
|
|
75
|
-
"\\bendHold",
|
|
76
|
-
"\\bendStartLevel",
|
|
77
72
|
"\\blackTriangleMarkup",
|
|
78
73
|
"\\bold",
|
|
79
74
|
"\\book",
|
|
@@ -81,7 +76,6 @@
|
|
|
81
76
|
"\\bookOutputSuffix",
|
|
82
77
|
"\\bookpart",
|
|
83
78
|
"\\box",
|
|
84
|
-
"\\bp",
|
|
85
79
|
"\\bracket",
|
|
86
80
|
"\\break",
|
|
87
81
|
"\\breathe",
|
|
@@ -103,7 +97,6 @@
|
|
|
103
97
|
"\\clef",
|
|
104
98
|
"\\cm",
|
|
105
99
|
"\\coda",
|
|
106
|
-
"\\codaMark",
|
|
107
100
|
"\\column",
|
|
108
101
|
"\\column-lines",
|
|
109
102
|
"\\combine",
|
|
@@ -182,8 +175,6 @@
|
|
|
182
175
|
"\\easyHeadsOff",
|
|
183
176
|
"\\easyHeadsOn",
|
|
184
177
|
"\\ellipse",
|
|
185
|
-
"\\EnableGregorianDivisiones",
|
|
186
|
-
"\\enablePolymeter",
|
|
187
178
|
"\\endcr",
|
|
188
179
|
"\\enddecr",
|
|
189
180
|
"\\endSpanners",
|
|
@@ -202,14 +193,12 @@
|
|
|
202
193
|
"\\fff",
|
|
203
194
|
"\\ffff",
|
|
204
195
|
"\\fffff",
|
|
205
|
-
"\\figured-bass",
|
|
206
196
|
"\\figuremode",
|
|
207
197
|
"\\figures",
|
|
208
198
|
"\\fill-line",
|
|
209
199
|
"\\fill-with-pattern",
|
|
210
200
|
"\\filled-box",
|
|
211
201
|
"\\finalis",
|
|
212
|
-
"\\fine",
|
|
213
202
|
"\\finger",
|
|
214
203
|
"\\first-visible",
|
|
215
204
|
"\\fixed",
|
|
@@ -231,7 +220,6 @@
|
|
|
231
220
|
"\\funkHeadsMinor",
|
|
232
221
|
"\\general-align",
|
|
233
222
|
"\\germanChords",
|
|
234
|
-
"\\glide",
|
|
235
223
|
"\\glissando",
|
|
236
224
|
"\\glissandoMap",
|
|
237
225
|
"\\grace",
|
|
@@ -259,9 +247,8 @@
|
|
|
259
247
|
"\\hspace",
|
|
260
248
|
"\\huge",
|
|
261
249
|
"\\ictus",
|
|
262
|
-
"\\if",
|
|
263
|
-
"\\IIJ",
|
|
264
250
|
"\\iij",
|
|
251
|
+
"\\IIJ",
|
|
265
252
|
"\\ij",
|
|
266
253
|
"\\IJ",
|
|
267
254
|
"\\improvisationOff",
|
|
@@ -269,7 +256,6 @@
|
|
|
269
256
|
"\\in",
|
|
270
257
|
"\\incipit",
|
|
271
258
|
"\\inclinatum",
|
|
272
|
-
"\\include",
|
|
273
259
|
"\\inherit-acceptability",
|
|
274
260
|
"\\inStaffSegno",
|
|
275
261
|
"\\instrumentSwitch",
|
|
@@ -278,7 +264,6 @@
|
|
|
278
264
|
"\\ionian",
|
|
279
265
|
"\\italianChords",
|
|
280
266
|
"\\italic",
|
|
281
|
-
"\\jump",
|
|
282
267
|
"\\justified-lines",
|
|
283
268
|
"\\justify",
|
|
284
269
|
"\\justify-field",
|
|
@@ -320,7 +305,7 @@
|
|
|
320
305
|
"\\major",
|
|
321
306
|
"\\makeClusters",
|
|
322
307
|
"\\makeDefaultStringTuning",
|
|
323
|
-
"\\map-commands",
|
|
308
|
+
"\\map-markup-commands",
|
|
324
309
|
"\\marcato",
|
|
325
310
|
"\\mark",
|
|
326
311
|
"\\markalphabet",
|
|
@@ -347,7 +332,6 @@
|
|
|
347
332
|
"\\modalTranspose",
|
|
348
333
|
"\\mordent",
|
|
349
334
|
"\\mp",
|
|
350
|
-
"\\multi-measure-rest-by-number",
|
|
351
335
|
"\\musicglyph",
|
|
352
336
|
"\\musicMap",
|
|
353
337
|
"\\n",
|
|
@@ -386,7 +370,6 @@
|
|
|
386
370
|
"\\overrideTimeSignatureSettings",
|
|
387
371
|
"\\overtie",
|
|
388
372
|
"\\p",
|
|
389
|
-
"\\pad",
|
|
390
373
|
"\\pad-around",
|
|
391
374
|
"\\pad-markup",
|
|
392
375
|
"\\pad-to-box",
|
|
@@ -428,7 +411,6 @@
|
|
|
428
411
|
"\\pointAndClickOff",
|
|
429
412
|
"\\pointAndClickOn",
|
|
430
413
|
"\\pointAndClickTypes",
|
|
431
|
-
"\\polygon",
|
|
432
414
|
"\\portato",
|
|
433
415
|
"\\postscript",
|
|
434
416
|
"\\pp",
|
|
@@ -440,8 +422,6 @@
|
|
|
440
422
|
"\\prallmordent",
|
|
441
423
|
"\\prallprall",
|
|
442
424
|
"\\prallup",
|
|
443
|
-
"\\preBend",
|
|
444
|
-
"\\preBendHold",
|
|
445
425
|
"\\predefinedFretboardsOff",
|
|
446
426
|
"\\predefinedFretboardsOn",
|
|
447
427
|
"\\property-recursive",
|
|
@@ -464,11 +444,6 @@
|
|
|
464
444
|
"\\RemoveEmptyStaves",
|
|
465
445
|
"\\removeWithTag",
|
|
466
446
|
"\\repeat",
|
|
467
|
-
"\\repeat percent",
|
|
468
|
-
"\\repeat segno",
|
|
469
|
-
"\\repeat tremolo",
|
|
470
|
-
"\\repeat unfold",
|
|
471
|
-
"\\repeat volta",
|
|
472
447
|
"\\repeatTie",
|
|
473
448
|
"\\replace",
|
|
474
449
|
"\\resetRelativeOctave",
|
|
@@ -481,7 +456,6 @@
|
|
|
481
456
|
"\\revertTimeSignatureSettings",
|
|
482
457
|
"\\rfz",
|
|
483
458
|
"\\rheel",
|
|
484
|
-
"\\rhythm",
|
|
485
459
|
"\\right-align",
|
|
486
460
|
"\\right-brace",
|
|
487
461
|
"\\right-column",
|
|
@@ -498,10 +472,7 @@
|
|
|
498
472
|
"\\scaleDurations",
|
|
499
473
|
"\\score",
|
|
500
474
|
"\\score-lines",
|
|
501
|
-
"\\section",
|
|
502
|
-
"\\sectionLabel",
|
|
503
475
|
"\\segno",
|
|
504
|
-
"\\segnoMark",
|
|
505
476
|
"\\semicirculus",
|
|
506
477
|
"\\semiflat",
|
|
507
478
|
"\\semiGermanChords",
|
|
@@ -551,11 +522,11 @@
|
|
|
551
522
|
"\\southernHarmonyHeads",
|
|
552
523
|
"\\southernHarmonyHeadsMinor",
|
|
553
524
|
"\\sp",
|
|
525
|
+
"\\spacingTweaks",
|
|
554
526
|
"\\spp",
|
|
555
527
|
"\\staccatissimo",
|
|
556
528
|
"\\staccato",
|
|
557
529
|
"\\staff-space",
|
|
558
|
-
"\\staffHighlight",
|
|
559
530
|
"\\startGroup",
|
|
560
531
|
"\\startStaff",
|
|
561
532
|
"\\startTrillSpan",
|
|
@@ -570,10 +541,8 @@
|
|
|
570
541
|
"\\stopGroup",
|
|
571
542
|
"\\stopped",
|
|
572
543
|
"\\stopStaff",
|
|
573
|
-
"\\stopStaffHighlight",
|
|
574
544
|
"\\stopTrillSpan",
|
|
575
545
|
"\\storePredefinedDiagram",
|
|
576
|
-
"\\string-lines",
|
|
577
546
|
"\\stringTuning",
|
|
578
547
|
"\\stropha",
|
|
579
548
|
"\\strut",
|
|
@@ -595,10 +564,8 @@
|
|
|
595
564
|
"\\temporary",
|
|
596
565
|
"\\tenuto",
|
|
597
566
|
"\\text",
|
|
598
|
-
"\\textEndMark",
|
|
599
567
|
"\\textLengthOff",
|
|
600
568
|
"\\textLengthOn",
|
|
601
|
-
"\\textMark",
|
|
602
569
|
"\\textSpannerDown",
|
|
603
570
|
"\\textSpannerNeutral",
|
|
604
571
|
"\\textSpannerUp",
|
|
@@ -642,10 +609,8 @@
|
|
|
642
609
|
"\\underline",
|
|
643
610
|
"\\undertie",
|
|
644
611
|
"\\undo",
|
|
645
|
-
"\\unfolded",
|
|
646
612
|
"\\unfoldRepeats",
|
|
647
613
|
"\\unHideNotes",
|
|
648
|
-
"\\unless",
|
|
649
614
|
"\\unset",
|
|
650
615
|
"\\upbow",
|
|
651
616
|
"\\upmordent",
|
|
@@ -671,8 +636,6 @@
|
|
|
671
636
|
"\\voiceTwo",
|
|
672
637
|
"\\voiceTwoStyle",
|
|
673
638
|
"\\void",
|
|
674
|
-
"\\volta",
|
|
675
|
-
"\\vshape",
|
|
676
639
|
"\\vspace",
|
|
677
640
|
"\\walkerHeads",
|
|
678
641
|
"\\walkerHeadsMinor",
|
|
@@ -680,15 +643,10 @@
|
|
|
680
643
|
"\\whiteTriangleMarkup",
|
|
681
644
|
"\\with",
|
|
682
645
|
"\\with-color",
|
|
683
|
-
"\\with-dimension",
|
|
684
|
-
"\\with-dimension-from",
|
|
685
646
|
"\\with-dimensions",
|
|
686
647
|
"\\with-dimensions-from",
|
|
687
648
|
"\\with-link",
|
|
688
649
|
"\\with-outline",
|
|
689
|
-
"\\with-string-transformer",
|
|
690
|
-
"\\with-true-dimension",
|
|
691
|
-
"\\with-true-dimensions",
|
|
692
650
|
"\\with-url",
|
|
693
651
|
"\\withMusicProperty",
|
|
694
652
|
"\\woodwind-diagram",
|
|
@@ -700,334 +658,5 @@
|
|
|
700
658
|
"\\wordwrap-string-internal",
|
|
701
659
|
"\\xNote",
|
|
702
660
|
"\\xNotesOff",
|
|
703
|
-
"\\xNotesOn"
|
|
704
|
-
"AccidentalSuggestion",
|
|
705
|
-
"add-grace-property",
|
|
706
|
-
"add-stem-support",
|
|
707
|
-
"add-toc-item!",
|
|
708
|
-
"additionalPitchPrefix",
|
|
709
|
-
"afterGraceFraction",
|
|
710
|
-
"alignAboveContext",
|
|
711
|
-
"alignBelowContext",
|
|
712
|
-
"ambitusAfter",
|
|
713
|
-
"AmbitusLine",
|
|
714
|
-
"annotate-spacing",
|
|
715
|
-
"arpeggio-direction",
|
|
716
|
-
"articulation-event",
|
|
717
|
-
"associatedVoice",
|
|
718
|
-
"aug",
|
|
719
|
-
"auto-first-page-number",
|
|
720
|
-
"autoBeaming",
|
|
721
|
-
"Balloon_engraver",
|
|
722
|
-
"banjo-c-tuning",
|
|
723
|
-
"banjo-double-c-tuning",
|
|
724
|
-
"banjo-double-d-tuning",
|
|
725
|
-
"banjo-modal-tuning",
|
|
726
|
-
"banjo-open-d-tuning",
|
|
727
|
-
"banjo-open-dm-tuning",
|
|
728
|
-
"banjo-open-g-tuning",
|
|
729
|
-
"barCheckSynchronize",
|
|
730
|
-
"BarNumber",
|
|
731
|
-
"barNumberVisibility",
|
|
732
|
-
"bartype",
|
|
733
|
-
"base-shortest-duration",
|
|
734
|
-
"baseMoment",
|
|
735
|
-
"beatStructure",
|
|
736
|
-
"binding-offset",
|
|
737
|
-
"blank-after-score-page-penalty",
|
|
738
|
-
"blank-last-page-penalty",
|
|
739
|
-
"blank-page-penalty",
|
|
740
|
-
"bookpart-level-page-numbering",
|
|
741
|
-
"bookTitleMarkup",
|
|
742
|
-
"bottom-margin",
|
|
743
|
-
"bracket",
|
|
744
|
-
"break-align-symbols",
|
|
745
|
-
"break-visibility",
|
|
746
|
-
"breakable",
|
|
747
|
-
"breakbefore",
|
|
748
|
-
"check-consistency",
|
|
749
|
-
"choral",
|
|
750
|
-
"choral-cautionary",
|
|
751
|
-
"chordChanges",
|
|
752
|
-
"ChordGrid",
|
|
753
|
-
"chordNameExceptions",
|
|
754
|
-
"chordNameLowercaseMinor",
|
|
755
|
-
"ChordNames",
|
|
756
|
-
"chordNameSeparator",
|
|
757
|
-
"chordNoteNamer",
|
|
758
|
-
"chordPrefixSpacer",
|
|
759
|
-
"chordRootNamer",
|
|
760
|
-
"clip-regions",
|
|
761
|
-
"color",
|
|
762
|
-
"common-shortest-duration",
|
|
763
|
-
"Completion_heads_engraver",
|
|
764
|
-
"Completion_rest_engraver",
|
|
765
|
-
"context-spec-music",
|
|
766
|
-
"controlpitch",
|
|
767
|
-
"countPercentRepeats",
|
|
768
|
-
"crescendo-event",
|
|
769
|
-
"crescendoSpanner",
|
|
770
|
-
"crescendoText",
|
|
771
|
-
"cross",
|
|
772
|
-
"CueVoice",
|
|
773
|
-
"currentBarNumber",
|
|
774
|
-
"debug-beam-scoring",
|
|
775
|
-
"debug-slur-scoring",
|
|
776
|
-
"debug-tie-scoring",
|
|
777
|
-
"decrescendoSpanner",
|
|
778
|
-
"decrescendoText",
|
|
779
|
-
"default",
|
|
780
|
-
"default-staff-staff-spacing",
|
|
781
|
-
"dim",
|
|
782
|
-
"dodecaphonic",
|
|
783
|
-
"dodecaphonic-first",
|
|
784
|
-
"dodecaphonic-no-repeat",
|
|
785
|
-
"drumPitchNames",
|
|
786
|
-
"drumPitchTable",
|
|
787
|
-
"DrumStaff",
|
|
788
|
-
"drumStyleTable",
|
|
789
|
-
"dynamic-event",
|
|
790
|
-
"DynamicLineSpanner",
|
|
791
|
-
"Engraver_group",
|
|
792
|
-
"explicitClefVisibility",
|
|
793
|
-
"explicitKeySignatureVisibility",
|
|
794
|
-
"extra-offset",
|
|
795
|
-
"extra-spacing-height",
|
|
796
|
-
"extra-spacing-width",
|
|
797
|
-
"Ez_numbers_engraver",
|
|
798
|
-
"figuredBassAlterationDirection",
|
|
799
|
-
"figuredBassPlusDirection",
|
|
800
|
-
"figuredBassPlusStrokedAlist",
|
|
801
|
-
"fingeringOrientations",
|
|
802
|
-
"first-page-number",
|
|
803
|
-
"followVoice",
|
|
804
|
-
"font-encoding",
|
|
805
|
-
"font-interface",
|
|
806
|
-
"font-size",
|
|
807
|
-
"fontSize",
|
|
808
|
-
"footnote-separator-markup",
|
|
809
|
-
"Forbid_line_break_engraver",
|
|
810
|
-
"forget",
|
|
811
|
-
"four-string-banjo",
|
|
812
|
-
"fret-diagram-interface",
|
|
813
|
-
"FretBoards",
|
|
814
|
-
"glide",
|
|
815
|
-
"GregorianTranscriptionStaff",
|
|
816
|
-
"gridInterval",
|
|
817
|
-
"Grid_line_span_engraver",
|
|
818
|
-
"Grid_point_engraver",
|
|
819
|
-
"grob-interface",
|
|
820
|
-
"grow-direction",
|
|
821
|
-
"horizontal-shift",
|
|
822
|
-
"HorizontalBracketText",
|
|
823
|
-
"Horizontal_bracket_engraver",
|
|
824
|
-
"indent",
|
|
825
|
-
"inner-margin",
|
|
826
|
-
"keepAliveInterfaces",
|
|
827
|
-
"KievanStaff",
|
|
828
|
-
"KievanVoice",
|
|
829
|
-
"last-bottom-spacing",
|
|
830
|
-
"layout-set-staff-size",
|
|
831
|
-
"left-margin",
|
|
832
|
-
"line-width",
|
|
833
|
-
"ly:minimal-breaking",
|
|
834
|
-
"ly:one-line-auto-height-breaking",
|
|
835
|
-
"ly:one-line-breaking",
|
|
836
|
-
"ly:one-page-breaking",
|
|
837
|
-
"ly:optimal-breaking",
|
|
838
|
-
"ly:page-turn-breaking",
|
|
839
|
-
"m",
|
|
840
|
-
"magnification->font-size",
|
|
841
|
-
"magstep",
|
|
842
|
-
"maj",
|
|
843
|
-
"majorSevenSymbol",
|
|
844
|
-
"make-dynamic-script",
|
|
845
|
-
"make-pango-font-tree",
|
|
846
|
-
"markup-markup-spacing",
|
|
847
|
-
"markup-system-spacing",
|
|
848
|
-
"Mark_engraver",
|
|
849
|
-
"max-systems-per-page",
|
|
850
|
-
"measureBarType",
|
|
851
|
-
"measureLength",
|
|
852
|
-
"measurePosition",
|
|
853
|
-
"Measure_grouping_engraver",
|
|
854
|
-
"MensuralStaff",
|
|
855
|
-
"MensuralVoice",
|
|
856
|
-
"midiBalance",
|
|
857
|
-
"midiChannelMapping",
|
|
858
|
-
"midiChorusLevel",
|
|
859
|
-
"midiDrumPitches",
|
|
860
|
-
"midiExpression",
|
|
861
|
-
"midiPanPosition",
|
|
862
|
-
"midiReverbLevel",
|
|
863
|
-
"min-systems-per-page",
|
|
864
|
-
"minimum-Y-extent",
|
|
865
|
-
"minimumFret",
|
|
866
|
-
"minimumPageTurnLength",
|
|
867
|
-
"minimumRepeatLengthForPageTurn",
|
|
868
|
-
"minorChordModifier",
|
|
869
|
-
"mixed",
|
|
870
|
-
"mode",
|
|
871
|
-
"modern",
|
|
872
|
-
"modern-cautionary",
|
|
873
|
-
"modern-voice",
|
|
874
|
-
"modern-voice-cautionary",
|
|
875
|
-
"MultiMeasureRestScript",
|
|
876
|
-
"MultiMeasureRestText",
|
|
877
|
-
"musicQuotes",
|
|
878
|
-
"neo-modern",
|
|
879
|
-
"neo-modern-cautionary",
|
|
880
|
-
"neo-modern-voice",
|
|
881
|
-
"neo-modern-voice-cautionary",
|
|
882
|
-
"no-reset",
|
|
883
|
-
"noChordSymbol",
|
|
884
|
-
"nonstaff-nonstaff-spacing",
|
|
885
|
-
"nonstaff-relatedstaff-spacing",
|
|
886
|
-
"nonstaff-unrelatedstaff-spacing",
|
|
887
|
-
"note-event",
|
|
888
|
-
"noteNameFunction",
|
|
889
|
-
"NoteNames",
|
|
890
|
-
"noteNameSeparator",
|
|
891
|
-
"Note_heads_engraver",
|
|
892
|
-
"Note_name_engraver",
|
|
893
|
-
"NullVoice",
|
|
894
|
-
"OneStaff",
|
|
895
|
-
"ottavation",
|
|
896
|
-
"ottavation-numbers",
|
|
897
|
-
"ottavation-ordinals",
|
|
898
|
-
"ottavation-simple-ordinals",
|
|
899
|
-
"ottavationMarkups",
|
|
900
|
-
"outer-margin",
|
|
901
|
-
"output-count",
|
|
902
|
-
"output-def",
|
|
903
|
-
"output-suffix",
|
|
904
|
-
"outside-staff-horizontal-padding",
|
|
905
|
-
"outside-staff-padding",
|
|
906
|
-
"outside-staff-priority",
|
|
907
|
-
"page-breaking",
|
|
908
|
-
"page-breaking-system-system-spacing",
|
|
909
|
-
"page-count",
|
|
910
|
-
"page-number-type",
|
|
911
|
-
"page-spacing-weight",
|
|
912
|
-
"paper-height",
|
|
913
|
-
"paper-width",
|
|
914
|
-
"partCombineListener",
|
|
915
|
-
"pedalSustainStyle",
|
|
916
|
-
"percent",
|
|
917
|
-
"Performer_group",
|
|
918
|
-
"piano",
|
|
919
|
-
"piano-cautionary",
|
|
920
|
-
"PianoStaff",
|
|
921
|
-
"pitchnames",
|
|
922
|
-
"Pitch_squash_engraver",
|
|
923
|
-
"predefinedDiagramTable",
|
|
924
|
-
"print-all-headers",
|
|
925
|
-
"print-first-page-number",
|
|
926
|
-
"print-page-number",
|
|
927
|
-
"printAccidentalNames",
|
|
928
|
-
"printNotesLanguage",
|
|
929
|
-
"printOctaveNames",
|
|
930
|
-
"quotedCueEventTypes",
|
|
931
|
-
"quotedEventTypes",
|
|
932
|
-
"r",
|
|
933
|
-
"R",
|
|
934
|
-
"ragged-bottom",
|
|
935
|
-
"ragged-last",
|
|
936
|
-
"ragged-last-bottom",
|
|
937
|
-
"ragged-right",
|
|
938
|
-
"remove-empty",
|
|
939
|
-
"remove-first",
|
|
940
|
-
"remove-grace-property",
|
|
941
|
-
"remove-layer",
|
|
942
|
-
"repeatCommands",
|
|
943
|
-
"repeatCountVisibility",
|
|
944
|
-
"reset-footnotes-on-new-page",
|
|
945
|
-
"rest-event",
|
|
946
|
-
"restNumberThreshold",
|
|
947
|
-
"restrainOpenStrings",
|
|
948
|
-
"rgb-color",
|
|
949
|
-
"RhythmicStaff",
|
|
950
|
-
"right-margin",
|
|
951
|
-
"s",
|
|
952
|
-
"score-markup-spacing",
|
|
953
|
-
"score-system-spacing",
|
|
954
|
-
"scoreTitleMarkup",
|
|
955
|
-
"Score_engraver",
|
|
956
|
-
"Score_performer",
|
|
957
|
-
"self-alignment-X",
|
|
958
|
-
"set-global-fonts",
|
|
959
|
-
"set-global-staff-size",
|
|
960
|
-
"short-indent",
|
|
961
|
-
"show-available-fonts",
|
|
962
|
-
"showFirstLength",
|
|
963
|
-
"showLastLength",
|
|
964
|
-
"skipBars",
|
|
965
|
-
"skipTypesetting",
|
|
966
|
-
"slashChordSeparator",
|
|
967
|
-
"slur-event",
|
|
968
|
-
"space-alist",
|
|
969
|
-
"spacing",
|
|
970
|
-
"Span_stem_engraver",
|
|
971
|
-
"staff-affinity",
|
|
972
|
-
"staff-padding",
|
|
973
|
-
"staff-staff-spacing",
|
|
974
|
-
"Staff.midiInstrument",
|
|
975
|
-
"staffgroup-staff-spacing",
|
|
976
|
-
"Staff_collecting_engraver",
|
|
977
|
-
"Staff_symbol_engraver",
|
|
978
|
-
"start-repeat",
|
|
979
|
-
"startAcciaccaturaMusic",
|
|
980
|
-
"startAppoggiaturaMusic",
|
|
981
|
-
"startGraceMusic",
|
|
982
|
-
"stem-spacing-correction",
|
|
983
|
-
"stemLeftBeamCount",
|
|
984
|
-
"stemRightBeamCount",
|
|
985
|
-
"stopAcciaccaturaMusic",
|
|
986
|
-
"stopAppoggiaturaMusic",
|
|
987
|
-
"stopGraceMusic",
|
|
988
|
-
"strictBeatBeaming",
|
|
989
|
-
"stringNumberOrientations",
|
|
990
|
-
"stringTunings",
|
|
991
|
-
"strokeFingerOrientations",
|
|
992
|
-
"subdivideBeams",
|
|
993
|
-
"suggestAccidentals",
|
|
994
|
-
"sus",
|
|
995
|
-
"system-count",
|
|
996
|
-
"system-separator-markup",
|
|
997
|
-
"system-system-spacing",
|
|
998
|
-
"systems-per-page",
|
|
999
|
-
"TabStaff",
|
|
1000
|
-
"TabVoice",
|
|
1001
|
-
"teaching",
|
|
1002
|
-
"text",
|
|
1003
|
-
"Text_mark_engraver",
|
|
1004
|
-
"TieColumn",
|
|
1005
|
-
"tieWaitForNote",
|
|
1006
|
-
"timeSignatureFraction",
|
|
1007
|
-
"Timing",
|
|
1008
|
-
"tocFormatMarkup",
|
|
1009
|
-
"tocIndentMarkup",
|
|
1010
|
-
"tocItemMarkup",
|
|
1011
|
-
"tocTitleMarkup",
|
|
1012
|
-
"top-margin",
|
|
1013
|
-
"top-markup-spacing",
|
|
1014
|
-
"top-system-spacing",
|
|
1015
|
-
"toplevel-bookparts",
|
|
1016
|
-
"toplevel-scores",
|
|
1017
|
-
"tremolo",
|
|
1018
|
-
"tuplet-slur",
|
|
1019
|
-
"TupletNumber",
|
|
1020
|
-
"tupletSpannerDuration",
|
|
1021
|
-
"two-sided",
|
|
1022
|
-
"unfold",
|
|
1023
|
-
"universal-color",
|
|
1024
|
-
"VaticanaStaff",
|
|
1025
|
-
"VaticanaVoice",
|
|
1026
|
-
"VerticalAxisGroup",
|
|
1027
|
-
"voice",
|
|
1028
|
-
"Voice",
|
|
1029
|
-
"volta",
|
|
1030
|
-
"Volta_engraver",
|
|
1031
|
-
"X-offset",
|
|
1032
|
-
"x11-color"
|
|
661
|
+
"\\xNotesOn"
|
|
1033
662
|
]
|
package/dist/bin/config.js
CHANGED
|
@@ -39,7 +39,7 @@ const filterGadget = (id) => {
|
|
|
39
39
|
const n = Number(id);
|
|
40
40
|
return n < 2300 || n > 2303; // Gadget, Gadget talk, Gadget definition, Gadget definition talk
|
|
41
41
|
};
|
|
42
|
-
const pkg = "wikiparser-node", version = "1.37.
|
|
42
|
+
const pkg = "wikiparser-node", version = "1.37.1";
|
|
43
43
|
/**
|
|
44
44
|
* Get the parser configuration for a Wikimedia Foundation project.
|
|
45
45
|
* @param site site nickname
|
package/dist/lib/lsp.js
CHANGED
|
@@ -39,7 +39,7 @@ const refTags = new Set(['ref']), referencesTags = new Set(['ref', 'references']
|
|
|
39
39
|
'heading',
|
|
40
40
|
'magic-word-name',
|
|
41
41
|
...renameTypes,
|
|
42
|
-
]), plainTypes = new Set(['text', 'comment', 'noinclude', 'include']), cssSelector = ['ext', 'html', 'table'].map(s => `${s}-attr#style`).join();
|
|
42
|
+
]), plainTypes = new Set(['text', 'comment', 'noinclude', 'include']), rawLilyPondCommands = new Set(['paper', 'book', 'bookpart', 'score', 'markuplist'].map(c => `\\${c}`)), cssSelector = ['ext', 'html', 'table'].map(s => `${s}-attr#style`).join();
|
|
43
43
|
/^(?:http:\/\/|\/\/)/iu; // eslint-disable-line @typescript-eslint/no-unused-expressions
|
|
44
44
|
const getLinkRegex = (0, common_1.getRegex)(protocol => new RegExp(`^(?:${protocol}|//)`, 'iu'));
|
|
45
45
|
/**
|
|
@@ -697,6 +697,9 @@ class LanguageService {
|
|
|
697
697
|
let type, parentNode;
|
|
698
698
|
if (mt?.[8] === undefined) {
|
|
699
699
|
cur = root.elementFromPoint(character, line);
|
|
700
|
+
if (!cur) {
|
|
701
|
+
return undefined;
|
|
702
|
+
}
|
|
700
703
|
({ type, parentNode } = cur);
|
|
701
704
|
}
|
|
702
705
|
if (mt?.[7] !== undefined || type === 'image-parameter') { // image parameter
|
|
@@ -790,15 +793,12 @@ class LanguageService {
|
|
|
790
793
|
&& (before[comment + 1] === '{' || !before.slice(comment).includes('\n'))) {
|
|
791
794
|
return undefined;
|
|
792
795
|
}
|
|
793
|
-
const word =
|
|
796
|
+
const word = /(?<!\\)\\[-a-z]+$/u.exec(curLine.slice(0, character))?.[0];
|
|
794
797
|
if (word) {
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
...getCompletion(data.filter(w => /^[a-z]/u.test(w)), 'Variable', word, position),
|
|
800
|
-
...getCompletion(data.filter(w => /^[A-Z]/u.test(w)), 'Class', word, position),
|
|
801
|
-
];
|
|
798
|
+
const words = parentNode.hasAttr('raw')
|
|
799
|
+
? this.#lilypondData
|
|
800
|
+
: this.#lilypondData.filter(c => !rawLilyPondCommands.has(c));
|
|
801
|
+
return getCompletion(words, 'Function', word, position);
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
804
|
else if (type === 'ext-inner' && constants_1.mathTags.has(cur.name)) {
|
|
@@ -1198,7 +1198,11 @@ class LanguageService {
|
|
|
1198
1198
|
* @param position position / 位置
|
|
1199
1199
|
*/
|
|
1200
1200
|
async provideDefinition(text, position) {
|
|
1201
|
-
const root = await this.#queue(text), node = root.elementFromPoint(position.character, position.line)
|
|
1201
|
+
const root = await this.#queue(text), node = root.elementFromPoint(position.character, position.line);
|
|
1202
|
+
if (!node) {
|
|
1203
|
+
return undefined;
|
|
1204
|
+
}
|
|
1205
|
+
const ext = node.is('ext') && node.name === 'ref'
|
|
1202
1206
|
? node
|
|
1203
1207
|
: node.closest('ext#ref'), refName = getRefTagAttr(ext, 'name');
|
|
1204
1208
|
if (!refName) {
|
|
@@ -1219,7 +1223,11 @@ class LanguageService {
|
|
|
1219
1223
|
* @param position position / 位置
|
|
1220
1224
|
*/
|
|
1221
1225
|
async resolveRenameLocation(text, position) {
|
|
1222
|
-
const root = await this.#queue(text), node = root.elementFromPoint(position.character, position.line)
|
|
1226
|
+
const root = await this.#queue(text), node = root.elementFromPoint(position.character, position.line);
|
|
1227
|
+
if (!node) {
|
|
1228
|
+
return undefined;
|
|
1229
|
+
}
|
|
1230
|
+
const { type } = node, refName = getRefName(node), refGroup = getRefGroup(node);
|
|
1223
1231
|
return !refName && !refGroup && (!renameTypes.has(type)
|
|
1224
1232
|
|| type === 'parameter-key' && /^[1-9]\d*$/u.test(node.parentNode.name)
|
|
1225
1233
|
|| type === 'link-target' && !['link', 'redirect-target'].includes(node.parentNode.type))
|
|
@@ -1235,7 +1243,11 @@ class LanguageService {
|
|
|
1235
1243
|
* @param newName new name / 新名称
|
|
1236
1244
|
*/
|
|
1237
1245
|
async provideRenameEdits(text, position, newName) {
|
|
1238
|
-
const root = await this.#queue(text), node = root.elementFromPoint(position.character, position.line)
|
|
1246
|
+
const root = await this.#queue(text), node = root.elementFromPoint(position.character, position.line);
|
|
1247
|
+
if (!node) {
|
|
1248
|
+
return undefined;
|
|
1249
|
+
}
|
|
1250
|
+
const { type } = node, refName = getRefName(node), refNameGroup = refName && getRefTagAttr(node.parentNode.parentNode, 'group'), refGroup = getRefGroup(node), name = getName(node), refs = root.querySelectorAll(type).filter(token => {
|
|
1239
1251
|
const { type: t } = token.parentNode;
|
|
1240
1252
|
if (type === 'link-target' && t !== 'link' && t !== 'redirect-target') {
|
|
1241
1253
|
return false;
|
package/extensions/dist/base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
var _a;
|
|
3
|
-
const version = '1.37.
|
|
3
|
+
const version = '1.37.1', src = (_a = document.currentScript) === null || _a === void 0 ? void 0 : _a.src, file = /\/extensions\/dist\/base\.(?:min\.)?js$/u, CDN = src && file.test(src)
|
|
4
4
|
? src.replace(file, '')
|
|
5
5
|
: `https://fastly.jsdelivr.net/npm/wikiparser-node@${version}`;
|
|
6
6
|
const workerJS = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiparser-node",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.1",
|
|
4
4
|
"description": "A Node.js parser for MediaWiki markup with AST",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mediawiki",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"prof": "node dist/test/prof.js",
|
|
61
61
|
"coverage": "tsc --declaration false --target es2024 && npm run build:define && c8 npm run test:ci && node dist/script/coverage.js && open coverage/index.html",
|
|
62
62
|
"test:unit": "mocha dist/test/test.js",
|
|
63
|
+
"test:math": "mocha dist/test/math.js",
|
|
63
64
|
"test:clonenode": "CLONENODE=1 npm run test:unit",
|
|
64
65
|
"test:parser": "LC_ALL=en.UTF-8 mocha dist/test/parserTests.js",
|
|
65
66
|
"test:perf": "mocha --reporter spec dist/test/perf.js",
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
"mathoid-texvcjs": "^0.6.0",
|
|
95
96
|
"prism-wiki": "^2.0.0",
|
|
96
97
|
"prismjs": "^1.30.0",
|
|
97
|
-
"stylelint": "^17.
|
|
98
|
+
"stylelint": "^17.6.0",
|
|
98
99
|
"vscode-css-languageservice": "^6.3.10",
|
|
99
100
|
"vscode-html-languageservice": "^5.6.2",
|
|
100
101
|
"vscode-json-languageservice": "^5.7.2"
|