Page MenuHomePhabricator

Generated TOC should ignore <ref> content
Open, MediumPublic

Description

Currently, if you create headline with reference, such as:

== Foo<ref>bar</ref> ==

the TOC is displayed as

  1. Foo[1]

and the section id is
Foo.5B1.5D

This behavior

  • creates highly unstable anchors (adding a single reference before such headline will change the anchor no matter that the headline itself hasn't been changed)
  • creates unconsistent behavior (it is expected that clicking on the ref will take you to the references section, however, clicking on the ref in TOC takes you to the section, since it is a part of the section link not the ref link)
  • lowers down the accessibility / user friendliness of the TOC

Thus generated TOC should ignore the <ref> content.

Event Timeline

Danny_B raised the priority of this task from to Medium.
Danny_B updated the task description. (Show Details)
Danny_B subscribed.

Wondering if that's T38434.

Well, it's a special case of that rather general bug.

While this is much more serious issue (see the list of issues I wrote in the bug description) as it adds text, other formatting, which is purely visual, is not, so the approach to them might and actually should be different.