rust/tests
Guillaume Gomez f676dd8729
Rollup merge of #140434 - a4lg:rustdoc-multi-footnote-refs, r=fmease,GuillaumeGomez
rustdoc: Allow multiple references to a single footnote

Multiple references to a single footnote is a part of GitHub Flavored Markdown syntax (although not explicitly documented as well as regular footnotes, it is implemented in GitHub's fork of CommonMark) and not prohibited by rustdoc.

cf. <587a12bb54/test/extensions.txt (L762-L780)>

However, using it makes multiple `sup` elements with the same `id` attribute, which is invalid per the HTML specification.

Still, not only this is a valid GitHub Flavored Markdown syntax, this is helpful on certain cases and actually tested (accidentally) in `tests/rustdoc/footnote-reference-in-footnote-def.rs`.

This commit keeps track of the number of references per footnote and gives unique ID to each 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.
2025-08-14 11:39:32 +02:00
..
assembly-llvm Rollup merge of #144962 - Gelbpunkt:aarch64_be-unknown-none-softfloat, r=davidtwco 2025-08-13 18:43:00 +02:00
auxiliary So many test updates x_x 2025-07-20 10:15:14 -07:00
codegen-llvm Auto merge of #145093 - nikic:dead-on-return, r=nnethercote 2025-08-13 04:18:43 +00:00
codegen-units Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk 2025-06-27 12:57:05 +00:00
coverage coverage: Remove all unstable support for MC/DC instrumentation 2025-08-06 22:38:52 +10:00
coverage-run-rustdoc
crashes Rollup merge of #143093 - lqd:polonius-pre-alpha, r=jackh726 2025-08-10 19:45:46 +10:00
debuginfo Revert "Embed GDB pretty printers in rlibs and dylibs" 2025-08-06 18:00:58 +00:00
incremental Bless incremental tests. 2025-07-13 13:50:01 +00:00
mir-opt Rollup merge of #144883 - scottmcm:remove-unneeded-drop_in_place, r=nnethercote 2025-08-09 13:58:44 +10:00
pretty expand: Micro-optimize prelude injection 2025-07-28 17:35:09 +03:00
run-make Fix pgo tests 2025-08-13 09:42:46 +08:00
rustdoc rustdoc: Allow multiple references to a single footnote 2025-08-14 04:39:31 +00:00
rustdoc-gui Add GUI regression test for tooltips i icons 2025-08-04 19:17:08 +02:00
rustdoc-js Rollup merge of #145100 - GuillaumeGomez:rank-doc-alias-lower, r=lolbinarycat 2025-08-09 13:58:52 +10:00
rustdoc-js-std Rollup merge of #141658 - lolbinarycat:rustdoc-search-stability-rank-138067, r=GuillaumeGomez 2025-08-09 13:58:42 +10:00
rustdoc-json rustdoc-json: Move #[macro_export] from Other to it's own variant 2025-07-30 19:57:32 +00:00
rustdoc-ui Rollup merge of #144921 - lolbinarycat:rustdoc-intra-doc-gfm-141866, r=fmease,GuillaumeGomez 2025-08-12 20:37:50 +10:00
ui Auto merge of #144793 - petrochenkov:extprel3, r=davidtwco 2025-08-13 22:52:17 +00:00
ui-fulldeps remove P 2025-08-09 15:47:01 +08:00
COMPILER_TESTS.md