-
Notifications
You must be signed in to change notification settings - Fork 21
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
Admonish doesn't work with mdbook test
#108
Comments
Hmm, interesting limitation. My guess is that As Note that you may need to first tweak your book.toml settings to make includes expand in the right order. So something like: # My nice book page
Code on this page is not tested
````admonish
```rust
{{#include some_rust_code.rs}}
```
```` # My secret test page
Code on this page is tested
```rust
{{#include some_rust_code.rs}}
``` // some_rust_code.rs
let x = 10;
x = 20; Something like this works for me locally, though I agree it's a bit of a pain. |
I just had a thought about this. It looks like I have to run and haven't had a chance to try this, but I thought I'd mention it since it might be as simple as having mdbook-admonish support the test renderer. I'll try to test it later today. |
Ah interesting. So I think you're right, I'd forgotten this system where we know the type of rendering that's being done. If we're in I'll have a look at that now |
This appears to support your use case - take a look and let me know any thoughts: #109 |
Released in v1.10.0 |
If I use an admonish example (or other box) containing a code example,
mdbook test
will not test that example.Here's an example of an example that doesn't get tested.
If I take it out of an
admonish example
fenced code block, the code is tested (and fails as expected).Is there a way to make this work?
The text was updated successfully, but these errors were encountered: