-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix index-page generation #60134
Fix index-page generation #60134
Conversation
☔ The latest upstream changes (presumably #60140) made this pull request unmergeable. Please resolve the merge conflicts. |
61505a2
to
d676386
Compare
This one is quite a huge issue so it'd be nice to have it reviewed as soon as possible. :-/ r? @Manishearth |
f, | ||
"R", | ||
Token::Char(ReservedChar::Backline), | ||
|tokens, pos| { | ||
pos < 2 || | ||
!tokens[pos - 1].is_char(ReservedChar::OpenBracket) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please leave a comment here explaining why this is necessary
At the very least this needs a test. |
@ollie27 To test it, we need two things:
I can do it, but considering the amount of code necessary, this promise to be complicated to maintain... |
Changing // aux-build:all-item-types.rs
// build-aux-docs
// compile-flags: -Z unstable-options --enable-index-page
#![crate_name = "foo"]
// @has foo/../index.html
// @has - '//span[@class="in-band"]' 'List of all crates'
// @has - '//ul[@class="mod"]//a[@href="foo/index.html"]' 'foo'
// @has - '//ul[@class="mod"]//a[@href="all_item_types/index.html"]' 'all_item_types'
pub struct Foo; is enough to test for #60096. Also now that crate names are no longer minified this code should be removed: rust/src/librustdoc/html/render.rs Lines 967 to 987 in bfb443e
|
@ollie27: Good catch! Completely forgot about this part... |
Updated! |
src/librustdoc/html/render.rs
Outdated
f, | ||
"R", | ||
Token::Char(ReservedChar::Backline), | ||
// This closure prevents crates' name to be aggregated. It allows to not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"This closure prevents crates' names from being aggregated."
I'm not sure what the second sentence means. And this doesn't explain how the OpenBracket or searchIndex check work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the second sentence means. And this doesn't explain how the OpenBracket or searchIndex check work.
Ah? I'll reword it then...
@Manishearth Are the explanations more clear this way or is there something else I need to clarify? |
@bors r+ thanks! |
📌 Commit 6aa5a5d has been approved by |
…nishearth Fix index-page generation Fixes rust-lang#60096. The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons. r? @rust-lang/rustdoc
…nishearth Fix index-page generation Fixes rust-lang#60096. The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons. r? @rust-lang/rustdoc
…nishearth Fix index-page generation Fixes rust-lang#60096. The minifier was minifying crates name in `searchIndex` key position, which was a bit problematic for multiple reasons. r? @rust-lang/rustdoc
Rollup of 12 pull requests Successful merges: - #59734 (Prevent failure in case no space left on device in rustdoc) - #59940 (Set cfg(test) when rustdoc is running with --test option) - #60134 (Fix index-page generation) - #60165 (Add Pin::{into_inner,into_inner_unchecked}) - #60183 (Chalkify: Add builtin Copy/Clone) - #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.) - #60247 (Implement Debug for Place using Place::iterate) - #60259 (Derive Default instead of new in applicable lint) - #60267 (Add feature-gate for f16c target feature) - #60284 (Do not allow const generics to depend on type parameters) - #60285 (Do not ICE when checking types against foreign fn) - #60289 (Make `-Z allow-features` work for stdlib features) Failed merges: r? @ghost
Fixes #60096.
The minifier was minifying crates name in
searchIndex
key position, which was a bit problematic for multiple reasons.r? @rust-lang/rustdoc