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 832 #841

Merged
merged 3 commits into from
May 8, 2019
Merged

Fix issue 832 #841

merged 3 commits into from
May 8, 2019

Conversation

basbossink
Copy link
Contributor

After a very brief inspection of src/book/init.rs I came to the conclusion it was not checking for an existing SUMMARY.md this PR adds an if and some tracing to check for an existing SUMMARY.md and only generate the stub files if no SUMMARY.md is currently present.

In my humble opinion this fixes #832.

Check if an existing SUMMARY.md is present to prevent overwriting it
with the stub SUMMARY.md.

[#832]
@ehuss
Copy link
Contributor

ehuss commented Apr 22, 2019

This looks good, though I think it would be good to have a test in tests/init.rs.

@basbossink
Copy link
Contributor Author

I've added the requested test.

@Dylan-DPC-zz Dylan-DPC-zz merged commit 5069968 into rust-lang:master May 8, 2019
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
* Add if around stub summary creation

Check if an existing SUMMARY.md is present to prevent overwriting it
with the stub SUMMARY.md.

[rust-lang#832]

* Add test for existing SUMMARY.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Existing SUMMARY.md not taken into account
3 participants