feat: support model introduced in v0.5.+#5
Merged
ngyewch merged 1 commit intongyewch:mainfrom Feb 22, 2026
Merged
Conversation
Note: v0.5.+ of mdbook introduces a list of breaking changes in preprocesor's model. This commit sync each change accordingly.
loicsikidi
commented
Feb 21, 2026
| // deprecated: since v0.5.0 of mdbook, Multilingual field has been removed | ||
| Multilingual bool `json:"multilingual,omitempty"` | ||
| Language string `json:"language,omitempty"` | ||
| TextDirection string `json:"text-direction,omitempty"` |
Contributor
Author
There was a problem hiding this comment.
According to the code kebab-case is used.
Source: https://github.com/rust-lang/mdBook/blob/master/crates/mdbook-core/src/config.rs#L316
loicsikidi
commented
Feb 21, 2026
| CreateMissing bool `json:"create_missing"` | ||
| UseDefaultPreprocessors bool `json:"use_default_preprocessors"` | ||
| ExtraWatchDirs []string `json:"extra_watch_dirs,omitempty"` | ||
| BuildDir string `json:"build-dir,omitempty"` |
Contributor
Author
There was a problem hiding this comment.
loicsikidi
commented
Feb 21, 2026
| } | ||
|
|
||
| // GetItems returns the list of book items | ||
| func (b *Book) GetItems() []*BookItem { |
Contributor
Author
There was a problem hiding this comment.
Allow to support both versions in a seamless manner
Owner
|
Nice, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #4