From 156cd5f5290e1d6952c99528c594a27a877f0d1a Mon Sep 17 00:00:00 2001 From: st0012 Date: Sun, 8 Feb 2026 10:18:26 +0000 Subject: [PATCH] Add unique IDs to section headings in Aliki template The Aliki TOC is generated by JavaScript that scans h1/h2/h3 elements with IDs. Section title h2 elements had no ID, so they were invisible to the TOC. Meanwhile, h3 IDs like "constants" and "public-instance-methods" were duplicated across sections. Prefix all heading IDs with the section's aref to make them unique. Move the section ID from the
element to the

so the TOC picks it up naturally. Fixes #1598 --- lib/rdoc/generator/template/aliki/class.rhtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/rdoc/generator/template/aliki/class.rhtml b/lib/rdoc/generator/template/aliki/class.rhtml index 7c571bc88b..39c303279a 100644 --- a/lib/rdoc/generator/template/aliki/class.rhtml +++ b/lib/rdoc/generator/template/aliki/class.rhtml @@ -40,10 +40,10 @@ <%- klass.each_section do |section, constants, attributes| %> -