Skip to content

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

@kornelski

Description

@kornelski

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions