You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lines in the snippet represents a Vec<String>, where each item is the content of a single #[doc = "..."] attribute.
This works great with /// comments, as the compiler converts each of these to its own #[doc = "..."] attribute, where ... is replace with the contents of the comment.
However, a /***/ comment is replaced with a single #[doc = "..."] attribute, where ... is replaced with every single character between the second and third * characters, including any leading or trailing \n.
So
/** * Scan progress */
is replaced with #[doc = "\n * Scan progress\n "]. This leading \n, combined with our default \n + "* " before the #[doc] contents, causes the weird blank line
The way we generate the doc string is:
lines
in the snippet represents aVec<String>
, where each item is the content of a single#[doc = "..."]
attribute.This works great with
///
comments, as the compiler converts each of these to its own#[doc = "..."]
attribute, where...
is replace with the contents of the comment.However, a
/***/
comment is replaced with a single#[doc = "..."]
attribute, where...
is replaced with every single character between the second and third*
characters, including any leading or trailing\n
.So
is replaced with
#[doc = "\n * Scan progress\n "]
. This leading\n
, combined with our default\n
+"* "
before the#[doc] contents
, causes the weird blank lineOriginally posted by @gustavo-shigueo in #316 (comment)
The text was updated successfully, but these errors were encountered: