Closed ojeda closed 1 month ago
Not sure if this Issue is still relevant, but for what it's worth, it is possible to inject arbitrary HTML in rustdocs simply by placing it in the doc comments:
impl fmt::Display for BStr {
+ /// <p style="font-weight: bold; background: #dad09d;">
+ /// Be wary of your editor’s word-wrap corrupting your patch, if you choose to cut-n-paste your patch.
+ /// </p>
///
/// Formats printable ASCII characters, escaping the rest.
I think with alloc
being custom soon, we can close this.
Injecting some custom HTML is an interesting idea @frazar, although I guess we would have wanted to do it somehow automatically, i.e. without having to write it all the time the same CSS styling and possibly automating the injection too (by looking at the "kernel"
annotation we had).
From https://github.com/Rust-for-Linux/linux/pull/402#discussion_r661030419:
From https://github.com/Rust-for-Linux/linux/pull/402#discussion_r661528647:
If we want something extra to the logo, e.g. to highlight individual methods, perhaps we can go with some unique to the kernel so that it is even more obvious, e.g. changing slightly the background color or a colored line in the right or left, etc.