fix(docs): preserve routes and navigation cache inputs

This commit is contained in:
morluto
2026-10-13 21:31:17 +08:00
parent ce3a418715
commit 2f1f944b6f
4 changed files with 9 additions and 4 deletions
+5 -1
View File
@@ -71,7 +71,11 @@ for (const page of htmlPages.sort()) {
)) {
const destination = match[1].replaceAll("&", "&");
const url = new URL(destination, origin + "/rea/" + route);
if (url.origin !== origin || !url.pathname.startsWith("/rea/")) continue;
if (url.origin !== origin) continue;
assert.ok(
url.pathname.startsWith("/rea/"),
route + ": local link escaped site base " + destination,
);
const key = url.pathname + url.hash;
if (checked.has(key)) continue;
checked.add(key);