about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-14 16:29:47 +0800
committerkennytm <kennytm@gmail.com>2018-03-15 00:15:47 +0800
commit57f76783be2d63cd48e6acc6056bd84567dd0d0a (patch)
treed101f834b2ee5d43c531e351c236a0f0b10c0dfc
parentb5f102c7aee92fb3559a5ed0a207ffaf287f496f (diff)
parentc80220436bf68dac572ee2c3d701d40f02e2eb88 (diff)
downloadrust-57f76783be2d63cd48e6acc6056bd84567dd0d0a.tar.gz
rust-57f76783be2d63cd48e6acc6056bd84567dd0d0a.zip
Rollup merge of #48964 - QuietMisdreavus:picket-fence, r=GuillaumeGomez
tweak code fences in the rustdoc book

You can stack backticks to create "big code fences" if you're documenting some markdown and need to have code fences inside your code fences. This is especially important in this spot in the Rustdoc Book, because we're showing that using no language specifier on your code blocks is interpreted as using `rust`, but the code blocks here lose their code fences!

`````````markdown
``````markdown
Just showing some recursion, nbd.

```rust
println!("sup");
```
``````

(If you have edit powers in the rust-lang/rust repo, hit the edit button to view the source and see even more recursion :P)
`````````
-rw-r--r--src/doc/rustdoc/src/documentation-tests.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/documentation-tests.md b/src/doc/rustdoc/src/documentation-tests.md
index e5a603a3709..cc7b15812ec 100644
--- a/src/doc/rustdoc/src/documentation-tests.md
+++ b/src/doc/rustdoc/src/documentation-tests.md
@@ -19,15 +19,19 @@ running `rustdoc --test foo.rs` will extract this example, and then run it as a
 Please note that by default, if no language is set for the block code, `rustdoc`
 assumes it is `Rust` code. So the following:
 
+``````markdown
 ```rust
 let x = 5;
 ```
+``````
 
 is strictly equivalent to:
 
+``````markdown
 ```
 let x = 5;
 ```
+``````
 
 There's some subtlety though! Read on for more details.