Open
Description
I've recently finished (what I consider) a usable version of waltz, a tool to extract code blocks from markdown and save them as files. This allows you to do something like literate programming with multiple files. (I wrote a bit about it here.)
I think this might be a nice addition to the rustdoc tests mdbook already supports. The main difference is that you need to specify a file name for the code block like this:
```rust,file=examples/foobar.rs
fn main() {
println!("Hello world!");
}
```
This syntax is valid CommonMark and works on Github as well.
(You might also need to do some pre-processing to remove the leading of #
some lines of code, if you support that kind of thing. waltz' main library function just takes an iterator of pulldown-cmark events, so this should be easy to do.)