mirror of
https://github.com/rust-lang/mdBook.git
synced 2025-12-27 11:25:45 -05:00
This fixes an issue where mdbook would panic if a non-draft chapter has a None source_path when generating the search index. The code was assuming that only draft chapters would have that behavior. However, API users can inject synthetic chapters that have no path on disk. This updates it to fall back to the path, or skip if neither is set.