wg-async
wg-async copied to clipboard
Diable playpen on code blocks
Hi, thanks for the nice book! I was looking at the book and wanted to see some outputs on some examples, but it seems like almost all the code in this book are not runnable. Should the run button be disabled?
Yes, I think you're right. Most of the examples aren't meant to be runnable code.
To disable the run button on individual codeblocks, I think you can add the "noplayground" tag, like this:
```rust,noplayground
fn some_rust_code_here() {}
```
It may also be possible to disable the playground integration bookwide, but I'm not sure.
Disabling individual codeblocks with noplayground seems to work, but disabling for the whole book does not seem to be implemented yet. See https://github.com/rust-lang/mdBook/issues/747 .
Would it help if I make a PR that adds noplayground to every codeblock? Or would that just make it hard to maintain?