Absolute path in SUMMARY.md causes panic!
Open
Nobody has claimed this yet.
C-bug
- Dominant language
- Rust
- Stars
- 22.2k
- Forks
- 1.9k
- PR merge metrics
- PR metrics pending
Description
Problem
I have the following SUMMARY.md:
- [Second](/tmp/second.md)
mdbook build and also mdbook serve panic:
thread 'main' panicked at /home/gabor/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/mdbook-0.4.45/src/book/book.rs:292:14:
Chapters are always inside a book: StripPrefixError(())
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
IMHO it should calmly report en error.
On the other hand, if I have this in the SUMMARY.md then it prints an error message about not being able to create the file without a panic!
- [Second](/second.md)
Version
mdbook v0.4.45
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with mdbook build and mdbook serve using the absolute paths shown in SUMMARY.md, then inspect src/book/book.rs around line 292. Done means both commands report the invalid absolute path as an error without panicking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100