-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Rustdoc generates illegal "<div>" inside "<pre>" with traits #64371
Comments
So, I assume a I can change that? |
Why is there even an element to do spacing, of all things? |
That’s not the issue here. The issue is that empty DOM elements aren’t how you are supposed to do spacing. That’s a CSS concern. If you have 1000 methods to space, that’s 999 spacing elements, those things add up and then the page is really hard on browsers.
|
Its also rather redundant in the context of a print!("\n") Or equivalent. I mean, you're already doing horizontal alignment with literal whitespace. |
Yes, adding an extra '\n' instead if the spacer-div adds a slightly bigger vertical space, but looks ok. |
If you really want markup, then IMO each trait item should be in its own |
Similar to the previous bugs I've filed in this regard with illegal html:
In: 1.39.0-nightly (34e82a7 2019-09-10)
The following trait definition:
Emits invalid html ( hand formatted ):
"pre", like headers, only permits child nodes that are "phrasing content", of which, div is excluded.
So the error is from
<div class='item-spacer'></div>
htmltidy
handles this by prematurely ending the<pre>
before the<div>
, and then reinserting a<pre>
afterwards, breaking layout:The text was updated successfully, but these errors were encountered: