rust-lang / rust-lang/mdBook

Section name repeats in search results when the chapter name is same as top-level tittle

Open
#2,265 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Search C-bug
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

When a section have a same top-level title with its name, the search results will repeat it. Just like:
Chapter1 » Section1 » Section1

Steps

Search any word

Possible Solution(s)

If the section name in SUMMARY.md is same as top-level title, it should be hide

Notes

No response

Version

v0.4.36

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the duplicate Chapter1 » Section1 » Section1 result by searching a book whose section name matches the top-level title, using the reported mdBook v0.4.36 behavior as a reference. Trace the search-result generation and determine how the repeated section label is included; done means the label appears only once and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.