-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Admonish breaks if on_failure = "bail"
is set and [preprocessor.admonish.default]
exists in book.toml
#196
Comments
Hi, thanks for the detailed report. Can I also ask which version of mdbook and mdbook-admonish you're using? sigh I've seen this error before in development, and thought I'd worked around it. It's an old bug in the toml library, but because mdbook can't upgrade it's toml dependency, we still have to care about it. If I recall correctly, this was triggered by defining new tables in some sequence after inline values. It's possible you could work around this by changing the structure of your config to use more inline tables, like on_failure = "bail"
default = { collapsible = true } but I haven't tested this. I tried pretty hard to properly solve this at the time and gave up, but I'll take another look. |
I'd tried an inline table as well, it still fails. I thought I mentioned the versions but it seems I lost them during editing, I tried ( |
Okay, after poking around more I found I was making this needlessly complex for myself. Thanks for making me fix it! |
Thank you for the fix! Just updated and it works fine now! |
Admonish will fail and break the build entirely if
on_failure = "bail"
is set and[preprocessor.admonish.default]
exists, for example as documented at https://tommilligan.github.io/mdbook-admonish/reference.html#booktoml-configuration.results in
commenting out
on_failure
successfully completes with no warnings or errors, and values take effect with no obvious issue. There is no error message I can find in the rendered output or anywhere else, as the documentation says there should be when there is an error: "If rendering to HTML, an error message will be displayed in the book output."It makes no difference whether any admonish blocks actually even exist in the mdbook.
This is the only configuration item for which I have observed this. It's a pretty annoying problem that having any defaults and reporting invalid blocks are mutually exclusive.
The text was updated successfully, but these errors were encountered: