Skip to content

Commit

Permalink
Improve documentation for using warning blocks in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Dec 23, 2023
1 parent c3ede70 commit ca2f8da
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/doc/rustdoc/src/how-to-write-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit ca2f8da

Please sign in to comment.