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
Copy file name to clipboardExpand all lines: text/3081-multi-part-examples-in-rustdoc/index.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -20,12 +20,12 @@ Currently, there are three means of achieving this:
20
20
1. Use rust comments inside the long example.
21
21
Downsides:
22
22
1. No markdown
23
-
1. If a comment overflows the rendered code block horizontally, scrolling is possible, yet cumbersome, especially when the comment is far from the bottom, where the scroll bar happens to be.
24
-
1. Split long examples into multiple code blocks and add the text between them.
23
+
2. If a comment overflows the rendered code block horizontally, scrolling is possible, yet cumbersome, especially when the comment is far from the bottom, where the scroll bar happens to be.
24
+
2. Split long examples into multiple code blocks and add the text between them.
25
25
Downsides:
26
26
1. Must disable doc-test-ing the example
27
-
1. Lack of UI indicating that the code blocks are multiple parts of a whole
28
-
1. Duplicate the example code in each part and hide, using [the `#` feature][hiding-portions], different lines in each example.
27
+
2. Lack of UI indicating that the code blocks are multiple parts of a whole
28
+
3. Duplicate the example code in each part and hide, using [the `#` feature][hiding-portions], different lines in each example.
29
29
There's an example of this in the link above.
30
30
Downsides:
31
31
1. Tedious. Macros may make this easier, but still not convenient.
@@ -230,4 +230,4 @@ We expect the release of this feature into stable to improve the overall experie
0 commit comments