diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-01-07 14:49:11 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-08-14 13:41:17 +0200 |
| commit | 57d2b84a57225717c6af8748574b4a847d62433c (patch) | |
| tree | df71c8246c8000e86db48e2d81001d95f9b061f2 | |
| parent | d51521e28044edcff0a1f7666629e5e7aea73727 (diff) | |
| download | rust-57d2b84a57225717c6af8748574b4a847d62433c.tar.gz rust-57d2b84a57225717c6af8748574b4a847d62433c.zip | |
Add documentation for warning blocks in rustdoc book
| -rw-r--r-- | src/doc/rustdoc/src/how-to-write-documentation.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/doc/rustdoc/src/how-to-write-documentation.md b/src/doc/rustdoc/src/how-to-write-documentation.md index 1fa9f814476..aaabaa6098f 100644 --- a/src/doc/rustdoc/src/how-to-write-documentation.md +++ b/src/doc/rustdoc/src/how-to-write-documentation.md @@ -254,6 +254,18 @@ characters: So, no need to manually enter those Unicode characters! +### Adding a warning block + +If you want to make a "warning" stand out in the documentation, you can wrap it like this: + +```md +/// documentation +/// +/// <div class="warning">A big warning!</div> +/// +/// more documentation +``` + [`backtrace`]: https://docs.rs/backtrace/0.3.50/backtrace/ [commonmark markdown specification]: https://commonmark.org/ [commonmark quick reference]: https://commonmark.org/help/ |
