]> Lady’s Gitweb - GitWikiWeb/commitdiff
Don’t add .sig links to the internal links list
authorLady <redacted>
Sat, 23 Sep 2023 22:06:26 +0000 (18:06 -0400)
committerLady <redacted>
Sat, 23 Sep 2023 22:06:26 +0000 (18:06 -0400)
build.js

index ae250ca9e6d140c3a9a6ccd760b215ad79c4de3d..3b40c3a347fa98ab45f0dd59a67fb317e03b5ca6 100644 (file)
--- 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 ??
This page took 0.026182 seconds and 4 git commands to generate.