diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-23 11:15:00 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-12-23 11:15:00 +0100 |
| commit | ca2f8da5f16892f100017d043866d12b87a13287 (patch) | |
| tree | a2783c2ce89037cf26aabdf212e1c0a2d4356ed9 | |
| parent | c3ede70d35e326818b562b57f43df1d82204eedb (diff) | |
| download | rust-ca2f8da5f16892f100017d043866d12b87a13287.tar.gz rust-ca2f8da5f16892f100017d043866d12b87a13287.zip | |
Improve documentation for using warning blocks in documentation
| -rw-r--r-- | src/doc/rustdoc/src/how-to-write-documentation.md | 16 |
1 files changed, 16 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 acab1a93690..8994c01f824 100644 --- a/src/doc/rustdoc/src/how-to-write-documentation.md +++ b/src/doc/rustdoc/src/how-to-write-documentation.md @@ -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/ |
