Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with None source_path #2550

Merged
merged 2 commits into from
Feb 17, 2025
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Feb 17, 2025

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.

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.
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Feb 17, 2025
@ehuss ehuss added this pull request to the merge queue Feb 17, 2025
Merged via the queue into rust-lang:master with commit 35cf96a Feb 17, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants