Rollup merge of #119245 - GuillaumeGomez:improve-docs, r=fmease

Improve documentation for using warning blocks in documentation

From [this comment](https://github.com/rust-lang/rust/issues/79710#issuecomment-1868225357), I think markdown can be surprising sometimes so better explain a bit better how to use it correctly.

r? `@notriddle`
This commit is contained in:
Matthias Krüger 2023-12-23 16:23:55 +01:00 committed by GitHub
commit a46ce0060a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,6 +267,22 @@ you can wrap it like this:
/// more documentation
```
Please note that if you want to put markdown in the HTML tag and for it to
be interpreted as such, you need to have an empty line between the HTML tags
and your markdown content. For example if you want to use a link:
```md
/// documentation
///
/// <div class="warning">
///
/// Go to [this link](https://rust-lang.org)!
///
/// </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/