public pages links

This commit is contained in:
Mateusz Gruszczyński
2026-08-06 14:20:38 +02:00
parent 017513db8a
commit 249e5a4fcd
4 changed files with 35 additions and 16 deletions
+2 -2
View File
@@ -152,9 +152,9 @@ function installPublicPermalinks() {
anchor.href = heading ? `#${encodeURIComponent(target.id)}` : `#L${line}`;
anchor.dataset.line = String(line);
anchor.dataset.linkKind = heading ? "heading" : "line";
anchor.textContent = heading ? "¶" : "#";
anchor.textContent = String(line);
anchor.setAttribute("aria-label", heading ? `Copy link to heading on line ${line}` : `Copy link to line ${line}`);
anchor.title = heading ? "Copy link to this heading" : `Copy link to line ${line}`;
anchor.title = heading ? `Copy link to this heading (line ${line})` : `Copy link to line ${line}`;
target.append(anchor);
});
}