-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Code blocks wrap #17017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I agree, it certainly looks ugly, we should make it scrollable. (Since they violate the rust formatting rules, but they should still be readable). |
@rgawdzik I think making them scrollable will look kind of ugly, especially considering that this is the official documentation. |
Actually scratch that, those code blocks being cut off are well below the 100 column limit. We should make the styling force the codeblocks to always have 100 columns. |
I don't see why you need 100 or 160(!) columns for code written explicitly for documentation, inline in the document. The text is already intentionally flowed in a narrower column than window width to be more readable. |
Because Rust style is 100 character lines. |
Triage: no change. Tagging |
http://doc.rust-lang.org/nightly/book/lifetimes.html#examples now contains an example of this, I think the original screenshot is gone now. the line
is 91 characters long, but wraps. |
thanks for the example @steveklabnik I am cheking that |
Implement creating generics for impl traits in associated types Hopefully fix rust-lang#17017
The guide currently has code sections that wrap: http://i.gyazo.com/8c2ac3f95775dd4847b3f0aae204eaa4.png
These sections are the regular, 100 col length. Rustdoc should make the code blocks wide enough to not let this happen.
The text was updated successfully, but these errors were encountered: