Skip to content

Commit 4b64645

Browse files
fix(website): decode URL-encoded hash fragments before scrolling to anchors
Fixes broken module links where URL-encoded characters (%20, etc.) in hash fragments prevented document.querySelector from finding matching anchors.
1 parent ee6b8ea commit 4b64645

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

website/result.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747

4848
const hash = window.location.hash;
4949
if (hash) {
50-
const target = document.querySelector(hash);
50+
const decodedHash = decodeURIComponent(hash);
51+
const target = document.querySelector(decodedHash);
5152
if (target) {
5253
target.scrollIntoView();
5354
}

0 commit comments

Comments
 (0)