Skip to content

folded chapters don't expand with highlight in URL #2671

@ehuss

Description

@ehuss

Problem

When opening a page in a book with folded chapters, and the highlight value in the URL, the chapter sidebar does not expand to unfold to that chapter.

Steps

Go directly to https://doc.rust-lang.org/nightly/rust-by-example/custom_types/enum.html?highlight=enums#enums

or

  1. Go to https://doc.rust-lang.org/nightly/rust-by-example/
  2. Type s to start a search, and enter "Enum"
  3. Click on the first element

Notice that the sidebar does not expand:

Image

It should expand (like it does if ?highlight=enums is not in the URL):

Image

Possible Solution(s)

No response

Notes

cc @notriddle This seems to have regressed via #2414

Version

mdbook v0.4.48

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: A bug, incorrect or unintended behaviorRegressionRegression from a previous versionS-foldArea: The chapter fold feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions