aboutsummaryrefslogtreecommitdiff
path: root/communities/red-right-hand/174bg.net
diff options
context:
space:
mode:
authorAlex Pooley (@zuedev) <zuedev@gmail.com>2026-05-14 22:15:14 +0100
committerAlex Pooley (@zuedev) <zuedev@gmail.com>2026-05-14 22:15:14 +0100
commitc4488b1c19d7e82c078d78c12d42894fd9be2173 (patch)
tree82c049e208fa29c13fc481d885c5cc5b85fbc145 /communities/red-right-hand/174bg.net
parent706d9c10c343955ac6ae107204c6d2b2a0bec80c (diff)
downloadunnamed-group-c4488b1c19d7e82c078d78c12d42894fd9be2173.tar
unnamed-group-c4488b1c19d7e82c078d78c12d42894fd9be2173.tar.gz
unnamed-group-c4488b1c19d7e82c078d78c12d42894fd9be2173.tar.bz2
unnamed-group-c4488b1c19d7e82c078d78c12d42894fd9be2173.tar.xz
unnamed-group-c4488b1c19d7e82c078d78c12d42894fd9be2173.zip
dynamic ids to each header
Diffstat (limited to 'communities/red-right-hand/174bg.net')
-rw-r--r--communities/red-right-hand/174bg.net/public/handbook/index.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/communities/red-right-hand/174bg.net/public/handbook/index.html b/communities/red-right-hand/174bg.net/public/handbook/index.html
index 69140d2..ab992bd 100644
--- a/communities/red-right-hand/174bg.net/public/handbook/index.html
+++ b/communities/red-right-hand/174bg.net/public/handbook/index.html
@@ -596,6 +596,13 @@
headings.forEach((heading) => {
const level = parseInt(heading.tagName[1]);
+ if (!heading.id) {
+ heading.id = heading.textContent
+ .trim()
+ .toLowerCase()
+ .replace(/[^\w\s-]/g, "")
+ .replace(/\s+/g, "-");
+ }
const tocLink = document.createElement("a");
tocLink.textContent = heading.textContent;
tocLink.href = `#${heading.id}`;