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

Export the mdbook version from the crate root #791

Closed
wants to merge 2 commits into from
Closed

Conversation

Michael-F-Bryan
Copy link
Contributor

This allows custom preprocessors and renderers to use the semver crate to make sure they're compatible with whatever version of mdbook is calling them.

@Michael-F-Bryan
Copy link
Contributor Author

As a forwards compatibility thing I've also added private __non_exhaustive elements to the renderer and preprocessor context structs to makes sure people can't construct or exhaustively destructure them.

This will break any custom renderers/preprocessors who previously depended on this, but I'd argue it was a mdbook bug to allow this in the first place. People should only ever be constructing a context with the new() constructor anyway. As far as I can tell, this would only affect myself, @Byron, and @JoshBrudnak.

@Michael-F-Bryan
Copy link
Contributor Author

I'm closing this PR in favour of #792, which was already based on top of this branch.

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.

1 participant