You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rustdoc: Allow multiple references to a single footnote
Multiple references to a single footnote is not prohibited by rustdoc but
causes multiple "sup" elements with the same "id" attribute, which is
invalid per the HTML specification.
However, such references are helpful on certain cases and actually tested
in tests/rustdoc/footnote-reference-in-footnote-def.rs.
This commit keeps track of the number of references per footnote and gives
unique ID per reference to a footnote reference. It also emits *all* back
links from a footnote to its references as "↩" (return symbol) plus a
numeric list in superscript.
As a known limitation, it assumes that all references to a footnote are
rendered (this is not always true if a dangling footnote has one or more
references but considered a reasonable compromise).
Also note that, this commit is designed so that no HTML changes will occur
unless multiple references to a single footnote is actually used.
0 commit comments