Skip to content

Commit

Permalink
Rollup merge of rust-lang#85668 - ehuss:fix-rustdoc-tasklist, r=Mark-…
Browse files Browse the repository at this point in the history
…Simulacrum

Fix tasklist example in rustdoc book.

There were a few issues with the tasklist example in the rustdoc book:

* Misspelled "incomplete"
* Checkmarks were backwards
* Didn't show the text for each item
* Used HTML which renders differently from how markdown renders it (which uses "disabled" marks)
* Didn't use blockquotes to offset the example like the other extensions do
* Missing a colon

Before:
<img width="160" alt="image" src="https://user-images.githubusercontent.com/43198/119503519-e7787880-bd1f-11eb-9f13-1c67754ce001.png">

After:
<img width="220" alt="image" src="https://user-images.githubusercontent.com/43198/119503449-d6c80280-bd1f-11eb-9ab5-fe4a6df82124.png">
  • Loading branch information
JohnTitor committed May 25, 2021
2 parents 95ca859 + 79a5b12 commit b922253
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/doc/rustdoc/src/how-to-write-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,13 @@ Example:

```md
- [x] Complete task
- [ ] IncComplete task
- [ ] Incomplete task
```

This will render as
This will render as:

<ul>
<li><input type="checkbox"></li>
<li><input type="checkbox" checked></li>
</ul>
> - [x] Complete task
> - [ ] Incomplete task
See the specification for the [task list extension] for more details.

Expand Down

0 comments on commit b922253

Please sign in to comment.