T48a Docs · Frame passes review; an id-less heading fails the build, protocol-relative links stay native

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 12:08:02 -04:00
1 parent 0b300f1f94
commit 484bec30e1
5 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ export function Docs() {
const target = e.target as HTMLElement;
const button = target.closest<HTMLButtonElement>("button.copy");
if (button) return void copy(button);
const link = target.closest<HTMLAnchorElement>("a[href^='/']");
const link = target.closest<HTMLAnchorElement>("a[href^='/']:not([href^='//'])");
if (!link || e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0) return;
e.preventDefault();
const url = new URL(link.href);