]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #49994 - frewsxcv:frewsxcv-doc-tests, r=QuietMisdreavus
authorkennytm <kennytm@gmail.com>
Mon, 16 Apr 2018 17:51:05 +0000 (01:51 +0800)
committerkennytm <kennytm@gmail.com>
Mon, 16 Apr 2018 19:34:34 +0000 (03:34 +0800)
Remove unnecessary indentation in rustdoc book codeblock.

None

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

index fea8685a605d6859b52fcd4a3806d016b5826e06..3098587a8a4ccc11f1e09e4cb40be02d604d3a01 100644 (file)
@@ -138,31 +138,31 @@ To keep each code block testable, we want the whole program in each block, but
 we don't want the reader to see every line every time.  Here's what we put in
 our source code:
 
-```text
-    First, we set `x` to five:
+``````markdown
+First, we set `x` to five:
 
-    ```
-    let x = 5;
-    # let y = 6;
-    # println!("{}", x + y);
-    ```
+```
+let x = 5;
+# let y = 6;
+# println!("{}", x + y);
+```
 
-    Next, we set `y` to six:
+Next, we set `y` to six:
 
-    ```
-    # let x = 5;
-    let y = 6;
-    # println!("{}", x + y);
-    ```
+```
+# let x = 5;
+let y = 6;
+# println!("{}", x + y);
+```
 
-    Finally, we print the sum of `x` and `y`:
+Finally, we print the sum of `x` and `y`:
 
-    ```
-    # let x = 5;
-    # let y = 6;
-    println!("{}", x + y);
-    ```
 ```
+# let x = 5;
+# let y = 6;
+println!("{}", x + y);
+```
+``````
 
 By repeating all parts of the example, you can ensure that your example still
 compiles, while only showing the parts that are relevant to that part of your