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

use rustdoc's body classes on the rustdoc-container #273

Merged
merged 1 commit into from Dec 18, 2018

Conversation

Projects
None yet
2 participants
@QuietMisdreavus
Copy link
Member

QuietMisdreavus commented Dec 6, 2018

Fixes #264 (requires updating prod server to tomorrow's nightly to include rust-lang/rust#56498 - however, today's nightly introduces the new source sidebar files mentioned in #270 so there will need to be another PR before that's totally ready)

Upstream rustdoc sets some styles on the <body> tag that affect some CSS rules. Most notably, on [src] pages, it sets the source class. Docs.rs doesn't currently carry over all of those styles (it does hardcode the rustdoc class, set on all pages, but misses everything else), which has caused some problems getting the new-style line numbers to work. This PR changes the rustdoc page handling to extract any classes being set on the <body> tag, so it can save them and apply them to the template when sending the page.

@onur onur self-requested a review Dec 17, 2018

@onur

onur approved these changes Dec 17, 2018

Copy link
Member

onur left a comment

Thanks for solving this problem 👍

I'll merge after server migration.

@onur onur merged commit d066faa into rust-lang:master Dec 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment