Skip to content

Commit 57d2b84

Browse files
Add documentation for warning blocks in rustdoc book
1 parent d51521e commit 57d2b84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/doc/rustdoc/src/how-to-write-documentation.md

+12
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,18 @@ characters:
254254

255255
So, no need to manually enter those Unicode characters!
256256

257+
### Adding a warning block
258+
259+
If you want to make a "warning" stand out in the documentation, you can wrap it like this:
260+
261+
```md
262+
/// documentation
263+
///
264+
/// <div class="warning">A big warning!</div>
265+
///
266+
/// more documentation
267+
```
268+
257269
[`backtrace`]: https://docs.rs/backtrace/0.3.50/backtrace/
258270
[commonmark markdown specification]: https://commonmark.org/
259271
[commonmark quick reference]: https://commonmark.org/help/

0 commit comments

Comments
 (0)