From: Lady Date: Sat, 23 Sep 2023 22:06:26 +0000 (-0400) Subject: Don’t add .sig links to the internal links list X-Git-Tag: 0.4.0~1 X-Git-Url: https://git.ladys.computer/GitWikiWeb/commitdiff_plain/93c08be2c3e76b56ca9c58a9ead229939f67d394 Don’t add .sig links to the internal links list --- diff --git a/build.js b/build.js index ae250ca..3b40c3a 100644 --- a/build.js +++ b/build.js @@ -345,11 +345,20 @@ class GitWikiWebPage { const resolvedReference = pageName == "" ? `Namespace:${expandedNamespace}` : `${expandedNamespace}:${pageName}`; - this.#internalLinks.add(resolvedReference); e.reference = resolvedReference; attributes["data-realm"] = "internal"; attributes["data-pagename"] = pageName; attributes["data-namespace"] = expandedNamespace; + if ( + resolvedReference.startsWith("Editor:") && + (attributes.class ?? "").split(/\s/gu).includes("sig") + ) { + // This is a special internal link; do not record it. + /* do nothing */ + } else { + // This is a non‐special internal link; record it. + internalLinks.add(resolvedReference); + } } else { attributes["data-realm"] = "external"; const remote = destination ??