Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: recursive footnote not rendered correctly #131946

Closed
Noratrieb opened this issue Oct 19, 2024 · 1 comment · Fixed by #133040
Closed

rustdoc: recursive footnote not rendered correctly #131946

Noratrieb opened this issue Oct 19, 2024 · 1 comment · Fixed by #133040
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@Noratrieb
Copy link
Member

rustdoc footnote-hell.md

# footnote-hell

Hello [^a].

[^a]: meow [^b]
[^b]: uwu [^a]

I expected to see this happen: all the links are correct, the backlinks are at least not completely wrong

Instead, this happened: a mess

Image

  • The first 1 points to #fn1
  • The second 1 points to #b
  • The third 1 points to #a

The backlinks are #fnref1 and #fnref2 respectively, which seems correct.

Meta

rustc --version --verbose:

rustdoc 1.84.0-nightly (3ed6e3cc6 2024-10-17)
@Noratrieb Noratrieb added the C-bug Category: This is a bug. label Oct 19, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 19, 2024
@Noratrieb Noratrieb added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 19, 2024
@fmease fmease added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Oct 19, 2024
Zalathar added a commit to Zalathar/rust that referenced this issue Oct 20, 2024
…riddle

rustdoc: Clean up footnote handling

Best reviewed commit by commit.

Extracts footnote handling logic into it's own file (first commit) and then makes that file slightly nicer to read/understand.

No functional changes, but lays the groundwork for making more changes to footnotes (eg rust-lang#131901, rust-lang#131946)
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 20, 2024
Rollup merge of rust-lang#131945 - aDotInTheVoid:footnote-time, r=notriddle

rustdoc: Clean up footnote handling

Best reviewed commit by commit.

Extracts footnote handling logic into it's own file (first commit) and then makes that file slightly nicer to read/understand.

No functional changes, but lays the groundwork for making more changes to footnotes (eg rust-lang#131901, rust-lang#131946)
@GuillaumeGomez
Copy link
Member

That was a funny case. So the fix is simple: we need to check for footnote references in footnote definitions. I have a fix ready, sending the patch once I added tests.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Nov 14, 2024
@bors bors closed this as completed in dd61213 Nov 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Nov 15, 2024
Rollup merge of rust-lang#133040 - GuillaumeGomez:footnote-ref-in-def, r=notriddle

[rustdoc] Fix handling of footnote reference in footnote definition

Fixes rust-lang#131946.

We didn't check if we had footnote reference in footnote definition.

r? `@notriddle`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants