Skip to content
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

QuietMisdreavus
Copy link
Member

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 December 17, 2018 14:02
Copy link
Member

@onur onur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants