Skip to content

Strange behavior when clicking to "Examples" and "Panics" headers in the docs #29449

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
defuz opened this issue Oct 29, 2015 · 2 comments · Fixed by #30036
Closed

Strange behavior when clicking to "Examples" and "Panics" headers in the docs #29449

defuz opened this issue Oct 29, 2015 · 2 comments · Fixed by #30036
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@defuz
Copy link
Contributor

defuz commented Oct 29, 2015

  1. Go to https://doc.rust-lang.org/std/vec/struct.Vec.html
  2. Scroll page to method definitions
  3. Click to any "Examples" or "Panics" header.
  4. Page jumps to the first same block on the page.

The problem is that all of these links have the same anchors (#examples, #panics). It is discouraging, especially when you're trying to give someone a link to an example of the documentation.

If it is not an easy fix, it might be worth at least remove <a> in these headers, and especially remove section character (§) on hover (it is clearly suggests that the link can be copied, but url is invalid).

And I'm sorry if this is a duplicate, I haven't found any similar issue.

@defuz defuz changed the title Strange behavior on clicking to "Examples" and "Panics" headers in the docs Strange behavior when clicking to "Examples" and "Panics" headers in the docs Oct 29, 2015
@bluss bluss added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 29, 2015
@apasel422
Copy link
Contributor

This is similar to #25001.

@NamPNQ
Copy link

NamPNQ commented Nov 3, 2015

This is fixed in alexcrichton@e60c8b2

bors added a commit that referenced this issue Dec 8, 2015
This expands the code which generates unique IDs for Markdown headers within a single block to each rendered page.

fixes #25001
fixes #29449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants