Skip to content

rustdoc: Fix links with inline code in trait impl docs #140868

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SpecificProtagonist
Copy link
Contributor

@SpecificProtagonist SpecificProtagonist commented May 9, 2025

Fixes #140857

@rustbot
Copy link
Collaborator

rustbot commented May 9, 2025

r? @notriddle

rustbot has assigned @notriddle.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels May 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 9, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Can you add a GUI test please? Doc is available here.

@notriddle
Copy link
Contributor

notriddle commented May 10, 2025

As far as I know the only html tags that can appear within the links generated from doc comments are code tags, if there are any others this needs to be expanded.

Not true. I can nest any tag I want in a link in a doc comment.

[my **bold**, _uncompromising_ ![Rust](https://doc.rust-lang.org/1.84.0/static.files/rust-logo-9a9549ea.svg) link](https://example.com)

my bold, uncompromising Rust link

To fix this, you'll need to iterate over the whole list of elements until you reach the summary.

@rustbot
Copy link
Collaborator

rustbot commented May 10, 2025

Some changes occurred in GUI tests.

cc @GuillaumeGomez

@SpecificProtagonist SpecificProtagonist force-pushed the rustdoc-trait-impl-code-link branch from 3734a75 to 31ae60d Compare May 10, 2025 17:36
@SpecificProtagonist
Copy link
Contributor Author

To fix this, you'll need to iterate over the whole list of elements until you reach the summary.

Fixed, thanks.

Can you add a GUI test please?

Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 this pull request may close these issues.

rustdoc: Inline code in links in first paragraph of doc of trait implementation not clickable
5 participants