-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[WIP] Reduce HTML output in rustdoc #41384
Conversation
For reference https://github.com/GuillaumeGomez/minifier-rs |
@GuillaumeGomez I'm pretty surprised to see your minifier drop so many closing tags. Especially the rules around omitting
|
Hum, good point.
The compression isn't "hardcore" so it leaves place for improvements. Using html5ever for this could be worth it, to be tested. This PR is a work in progress after all and isn't to be merged right now. |
Note that a tool like this seems like it has a high chance of accidentally introducing regressions, it'd be great if we could add some regression testing as well to this. |
@alexcrichton: it's not close at all to get merged. For now it was mostly to get some feedbacks. Do you have an idea by any chance on how I could test regressions in here? |
To start this could use an html parser like html5ever and enusre the document structure doesn't change for standard Rust properties like:
|
I'm not currently on rustdoc, so assigning to alex |
It'd be nice if we could do this to rustdoc's CSS as well. |
@clarcharr: It's scheduled (at least I intend to do it). |
In my opinion, minimizing HTML and CSS is something that would be cool to do for all pages generated by rustdoc, but it seems the underlying tool has some incubation to so. I have some concerns about some of the strategies it does and the lack of testing. I don't know if this PR is the most effective way to get feedback though |
Well, at least it opens the debate. I still have a lot to do on the minimizer tool. |
@GuillaumeGomez: What's the current status of this PR? |
Quite busy, I still need to rewrite the HTML minifier (using html5ever). I'll try to get to it in the next weeks or so. |
☔ The latest upstream changes (presumably #41843) made this pull request unmergeable. Please resolve the merge conflicts. |
Ok I'm going to close this for now to help keep the queue clear, but please of course feel free to resubmit! |
r? @rust-lang/docs