add doc in mdbook.md
This commit is contained in:
parent
89e37a7751
commit
2ae7f007cc
|
@ -41,7 +41,7 @@ println!("Hello, World!");
|
||||||
|
|
||||||
If there is no `main` function, then the code is automatically wrapped inside one.
|
If there is no `main` function, then the code is automatically wrapped inside one.
|
||||||
|
|
||||||
If you wish to disable the play button, you can include the `noplayground` option on the code block like this:
|
If you wish to disable the play button for a code block, you can include the `noplayground` option on the code block like this:
|
||||||
|
|
||||||
~~~markdown
|
~~~markdown
|
||||||
```rust,noplayground
|
```rust,noplayground
|
||||||
|
@ -51,6 +51,13 @@ println!("Hello {}!", name);
|
||||||
```
|
```
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
Or, if you wish to disable the play button for all code blocks in your book, you can write the config to the `book.toml` like this.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[output.html.playground]
|
||||||
|
runnable = false
|
||||||
|
```
|
||||||
|
|
||||||
## Rust code block attributes
|
## Rust code block attributes
|
||||||
|
|
||||||
Additional attributes can be included in Rust code blocks with comma, space, or tab-separated terms just after the language term. For example:
|
Additional attributes can be included in Rust code blocks with comma, space, or tab-separated terms just after the language term. For example:
|
||||||
|
|
Loading…
Reference in New Issue