Update to work with mdbook 0.5.x#196
Conversation
Use the new `mdbook-preprocessor` crate.
| @@ -1,3 +1,3 @@ | |||
| [package] | |||
| name = "mdbook-tera" | |||
| version = "0.6.0" | |||
There was a problem hiding this comment.
| version = "0.6.1" |
to the extent that semantic versioning is real, 0.6.1 ok?
because in our line of work you almost have to be more pedantic than a computer, which is just heartbreaking, semver.org
PATCH version when you make backward compatible bug fixes
(functionally just trying to get this to play nice with cargo toml/lock etc.)
and @stevecheckoway thank you so much!
There was a problem hiding this comment.
Changing the version certainly seems reasonable. I'm not sure how @avitex wants to handle versioning.
Annoyingly, the mdBook changes themselves are not backwards compatible. In particular, the JSON that is passed to the preprocessors changed format. Specifically, a field was renamed from sections to items and this breaks the parse_input() function. https://github.com/rust-lang/mdBook/blob/b8c90970a63966154b19b4c0a1e4d6ba52fe6375/crates/mdbook-preprocessor/src/lib.rs#L82
I don't know why mdBook didn't add an alias for sections when they renamed it but it means that preprocessors fail to parse the input before they even see the version number so they cannot even fail gracefully if the versions don't match.
I guess that since the version is less than 1.0.0, semver is fine with that breaking change.
My guess would be it would make sense to change the version of mdbook-tera to 0.7.0 so that people could use 0.6 to continue working with mdBook version 0.4.x.
|
@avitex Gentle ping. |
Use the new
mdbook-preprocessorcrate.Fixes: #194.