-
Notifications
You must be signed in to change notification settings - Fork 33
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
WIP: Upgrade to the new custom preprocessor system #2
WIP: Upgrade to the new custom preprocessor system #2
Conversation
It's missing the actual implementation (so probably forgot to commit src/lib.rs?) |
I didn't actually need to touch anything in When I'm writing up a page for the user guide I should probably mention the easiest way to write a custom preprocessor is to implement the |
Oooooh, I see. Even better. I'll check the implementation again. |
@badboy I'm thinking of merging in rust-lang/mdBook#792. Did you get a chance to review this PR? Any feedback on the general mechanism for custom preprocessors would also be useful. |
tl;dr: go for it! Yey, preprocessors! I haven't given the upstream PR a proper look. This PR is small enough that I'm not worried about the changes. I do like the idea of simple transformations on JSON (afaik pandoc does it similar). That will allow to have plugins in any language easily (avoids huge and slower-to-compile Rust plugins). |
I'd really like to do this too! At the moment |
@badboy I just pushed |
I was nudged enough to finally update this, merged and updated here: https://github.com/badboy/mdbook-mermaid/compare/3cea267..3951f00?diff=unified |
I'm mainly doing this to see what working with the rust-lang/mdBook#792 will be like. Translating from the previous "wrapped" form to the plugin system was super simple, I essentially reused the existing
Mermaid
preprocessor and copied the guts from the nop-preprocessor example.Obviously this won't be ready for other people to use until the custom preprocessor PR makes its way into a release.
How does it look to you @badboy?