Consider the following structure with documentation:
/// Item docs.
///
#[doc="Hello there!"]
///
/// # Example
///
/// ```rust
/// // some code here
/// ```
pub struct NonGen;
At present, rustdoc will render this as:
Item docs.
Hello there!
# Example
When the following is expected:
Item docs.
Hello there!
Example
In short, after a #[doc] attribute, a markdown header is not interpreted as markdown.
This also applies to headers declared using ===, where
is rendered by rustdoc as:
Example =======
as opposed to the expected:
Example
I wouldn't be surprised if this is a more systemic issue and additional markdown syntax is interpreted literally as well.
Consider the following structure with documentation:
At present,
rustdocwill render this as:When the following is expected:
In short, after a
#[doc]attribute, a markdown header is not interpreted as markdown.This also applies to headers declared using
===, whereis rendered by
rustdocas:as opposed to the expected:
I wouldn't be surprised if this is a more systemic issue and additional markdown syntax is interpreted literally as well.