Skip to content

Inconsistent link underlining in [՝Smth՝] vs <code>[Smth]</code> (regression in nightly?) #133484

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

Closed
Kijewski opened this issue Nov 26, 2024 · 0 comments · Fixed by #135499
Closed
Assignees
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Kijewski
Copy link
Contributor

Kijewski commented Nov 26, 2024

Inconsistent link underlining in [`Smth`] vs <code>[Smth]</code> (regression in nightly?)

Location

In the generated documentation, e.g. in the documentation text of methods.

Summary

In the generated documentation, some links get underlined when you hover them, others don't.

E.g. when you write [`Smth`], then Smth does not get underlined when you hover your cursor over the link. But if you use <code>[Smth]</code> then it does. The latter variant is not often need, but it is useful e.g. if you want to link multiple trait bounds as in <code>[Box]&lt;dyn [Error] + [Send] + [Sync]&gt;</code>. It would be nice if the behavior was consistent. Either every link gets underlined or none.

On stable (1.82.0) and beta (1.83.0-beta.7), every link gets underlined1, but on cargo 1.84.0-nightly (031049782 2024-11-01) the inconsistency is present. Tested in Firefox 134 and Chrome 132.

1) which I prefer, but I guess that's beside the point :)

@Kijewski Kijewski added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Nov 26, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 26, 2024
@Kijewski Kijewski changed the title Inconsistent link underlining in `[Smth] vs <code>[Smth]</code>` (regression in nightly?) Inconsistent link underlining in [՝Smth՝] vs <code>[Smth]</code> (regression in nightly?) Nov 26, 2024
@fmease fmease added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name and removed A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools labels Nov 26, 2024
@jieyouxu jieyouxu added C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Nov 26, 2024
@lolbinarycat lolbinarycat self-assigned this Jan 14, 2025
lolbinarycat added a commit to lolbinarycat/rust that referenced this issue Jan 14, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Jan 15, 2025
…e-133484, r=GuillaumeGomez

fix underlining of hovered intra-doc links.

fixes rust-lang#133484

i'm not sure how to create a test case for this, or if that is even possible.
@bors bors closed this as completed in 4f6902d Jan 15, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 15, 2025
Rollup merge of rust-lang#135499 - lolbinarycat:rustdoc-link-underline-133484, r=GuillaumeGomez

fix underlining of hovered intra-doc links.

fixes rust-lang#133484

i'm not sure how to create a test case for this, or if that is even possible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants