Skip to content

Commit 081dfd7

Browse files
3081: explicit list item numbers in #motivation
Co-authored-by: mbartlett21 <29034492+mbartlett21@users.noreply.github.com>
1 parent b920c62 commit 081dfd7

File tree

1 file changed

+5
-5
lines changed
  • text/3081-multi-part-examples-in-rustdoc

1 file changed

+5
-5
lines changed

text/3081-multi-part-examples-in-rustdoc/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Currently, there are three means of achieving this:
2020
1. Use rust comments inside the long example.
2121
Downsides:
2222
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.
2525
Downsides:
2626
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.
2929
There's an example of this in the link above.
3030
Downsides:
3131
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
230230
[rfc_2894]: https://github.com/rust-lang/rfcs/pull/2894
231231
[rfc_comment]: https://github.com/rust-lang/rfcs/pull/2894#issuecomment-773913220
232232
[literate_programming]: https://en.wikipedia.org/wiki/Literate_programming
233-
[commonmark-fenced]: https://spec.commonmark.org/0.29/#fenced-code-blocks
233+
[commonmark-fenced]: https://spec.commonmark.org/0.29/#fenced-code-blocks

0 commit comments

Comments
 (0)