Re: [PATCH 11/13] rust: kernel: add doclinks with html tags

From: Martin Rodriguez Reboredo
Date: Tue Jan 16 2024 - 21:00:39 EST


On 1/16/24 20:11, Valentin Obst wrote:
Add doclinks to existing documentation. Use html 'code' tags to add
links to items that cannot be linked with the normal syntax.

The use of html tags is a tradeoff between the readability of the
documentation's source code and the ergonomics of the generated content.

Signed-off-by: Valentin Obst <kernel@xxxxxxxxxxxxxxx>
---
[...]
@@ -14,7 +14,8 @@
/// Byte string without UTF-8 validity guarantee.
///
-/// `BStr` is simply an alias to `[u8]`, but has a more evident semantical meaning.
+/// `BStr` is simply an alias to <code>[[u8]]</code>, but has a more evident
+/// semantical meaning.

Isn't there a way to escape square brackets with backslashes with
mbBook? Like `\[qux\]` or something? I ask this because this affects the
readability of the doc comment so if that could be omitted it'll be
really good.

pub type BStr = [u8];
/// Creates a new [`BStr`] from a string literal.
[...]