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
Putting code at the top of a docstring results in the entire code bit being included in the short summary of the docstring.
The following code
/// ```/// foo/// bar/// ```pubstructFoo;
Results in the following foo/index.html page
Having large code samples there generates ugly documentation. For instance, I ran across the following while working through #54824 (in src/test/rustdoc/issue-47183.rs)
My suggestion would be that rustdoc should detect whether the first line of a doc comment is the beginning of a code block, and if so, it should leave it out of the "preview".
The text was updated successfully, but these errors were encountered:
Havvy
added
the
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
label
Oct 10, 2018
Putting code at the top of a docstring results in the entire code bit being included in the short summary of the docstring.
The following code
Results in the following foo/index.html page
Having large code samples there generates ugly documentation. For instance, I ran across the following while working through #54824 (in src/test/rustdoc/issue-47183.rs)
Which is generated by the following code:
My suggestion would be that rustdoc should detect whether the first line of a doc comment is the beginning of a code block, and if so, it should leave it out of the "preview".
The text was updated successfully, but these errors were encountered: