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

Links in mdbook search result pages have incorrect anchors, don't scroll to the relevant section #6084

Closed
kornelski opened this issue Sep 24, 2018 · 2 comments
Labels
A-documenting-cargo-itself Area: Cargo's documentation

Comments

@kornelski
Copy link
Contributor

If I search for "links manifest key": https://doc.rust-lang.org/cargo/reference/build-scripts.html?search=links%20manifest%20key

the first result is the expected section, but the link to the section is:

https://doc.rust-lang.org/cargo/reference/build-scripts.html?highlight=links,manifest,key#the--links--manifest-key

with #the--links--manifest-key fragment, but the section's URL is:

https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key

with #the-links-manifest-key

This breaks scrolling to the correct section, and for very long pages (like this one), this is confusing and gives impression that the wrong page has been shown.

@ehuss
Copy link
Contributor

ehuss commented Sep 24, 2018

This is rust-lang/mdBook#720. I don't think there's much we can do about it until it is fixed in mdbook.

@ehuss ehuss added the A-documenting-cargo-itself Area: Cargo's documentation label Nov 18, 2018
@ehuss
Copy link
Contributor

ehuss commented May 24, 2021

This was fixed for Cargo a long while back via rust-lang/rust#62733. There are still some potential areas where it might not match, but I'm not aware of any existing ones in the docs today.

@ehuss ehuss closed this as completed May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation
Projects
None yet
Development

No branches or pull requests

2 participants