Skip to content

Commit 57f7678

Browse files
committed
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) `````````
2 parents b5f102c + c802204 commit 57f7678

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/doc/rustdoc/src/documentation-tests.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ running `rustdoc --test foo.rs` will extract this example, and then run it as a
1919
Please note that by default, if no language is set for the block code, `rustdoc`
2020
assumes it is `Rust` code. So the following:
2121

22+
``````markdown
2223
```rust
2324
let x = 5;
2425
```
26+
``````
2527

2628
is strictly equivalent to:
2729

30+
``````markdown
2831
```
2932
let x = 5;
3033
```
34+
``````
3135

3236
There's some subtlety though! Read on for more details.
3337

0 commit comments

Comments
 (0)