Page MenuHomePhabricator

Nesting headings in templates messes with the TOC bolding feature
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
When scrolling, random headings in the TOC are bolded out because some are nested between Template:Collapse top and Template:Collapse bottom

What should have happened instead?:
The currently read section should be bolded out

Event Timeline

Another example: compare https://en.wikipedia.org/w/index.php?title=Wikipedia:Arbitration/Requests/Clarification_and_Amendment&oldid=1167627265 with https://en.wikipedia.org/w/index.php?title=Wikipedia:Arbitration/Requests/Clarification_and_Amendment&oldid=1167874333

After the discussion was surrounded by an enclosing element (see https://en.wikipedia.org/w/index.php?title=Wikipedia:Arbitration/Requests/Clarification_and_Amendment&diff=prev&oldid=1167874333 ), the sub heading "Statement by Thepharoah17" is bolded by default.

Because this page is transcluded by https://en.wikipedia.org/wiki/Wikipedia:Arbitration/Requests, this behaviour is currently appearing on this page, which magnifies its effect to a larger scope (until the content on the Clarification and Amendment page is archived).

Note I reported the original issue at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)/Archive_207#Vector_2022_table_of_contents:_bolded_heading_differing_from_current_scroll_position . As I identified in that posting, the bolded heading is not random, but one within the collapsed section of text.