rust-lang / rust-lang/mdBook

Links with empty path cause error

Open
#2,369 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem

Metal3 project is using mdbook for documentation. I added a prerocessor to the docs. When the preprocessor is in use mdbook build trows error if there are Draft Chapters aka links with out any path. This is the error: thread 'main' panicked at '', src/utils/fs.rs:45:10.

Steps
Possible Solution(s)

No response

Notes

No response

Version
v0.0.28

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 failure by adding a draft chapter link to SUMMARY.md and running mdbook build or make netlify-build. Start at src/utils/fs.rs:45:10 and trace how the empty path is handled; done means the build completes without panicking for draft chapters.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, documentation
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.