You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [`mdbook`][mdbook], you can make code examples playable and editable.
18
+
-->
19
+
[`mdbook`][mdbook]では、コード例を実行・編集可能にできます。
8
20
9
21
```rust,editable
10
22
fn main() {
11
23
println!("Hello World!");
12
24
}
13
25
```
14
26
27
+
<!--
15
28
This allows the reader to both run your code sample, but also modify and tweak it. The key here is the adding the word `editable` to your codefence block separated by a comma.
29
+
-->
30
+
これにより、読者はあなたのコード例を実行するだけでなく、変更することもできます。
31
+
`editable`という単語をカンマで区切って、あなたのコードブロックに追加するのがキーです。
16
32
33
+
<!--
17
34
````markdown
18
35
```rust,editable
19
36
//...place your code here
20
37
```
21
38
````
39
+
-->
40
+
````markdown
41
+
```rust,editable
42
+
//...ここにあなたのコードを書きます
43
+
```
44
+
````
22
45
46
+
<!--
23
47
Additionally, you can add `ignore` if you want `mdbook` to skip your code when it builds and tests.
You may have noticed in some of the [official Rust docs][official-rust-docs] a button that says "Run", which opens the code sample up in a new tab in Rust Playground. This feature is enabled if you use the #[doc] attribute called [`html_playground_url`][html-playground-url].
0 commit comments