-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Remove extra whitespace from rustdoc breadcrumbs for copypasting #135946
Merged
+5
−8
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @notriddle rustbot has assigned @notriddle. Use |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Jan 23, 2025
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
cc @notriddle |
kornelski
force-pushed
the
rustdoc-path-space
branch
2 times, most recently
from
January 25, 2025 02:53
a276a41
to
cd324ec
Compare
kornelski
force-pushed
the
rustdoc-path-space
branch
from
January 25, 2025 02:53
cd324ec
to
1d97a3e
Compare
Yep, that works. @bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jan 26, 2025
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jan 26, 2025
…triddle Remove extra whitespace from rustdoc breadcrumbs for copypasting The docs header used to display [item names with their full path](https://doc.rust-lang.org/1.82.0/std/os/unix/ffi/trait.OsStrExt.html), but a [recent design change](https://doc.rust-lang.org/1.83.0/std/os/unix/ffi/trait.OsStrExt.html) has split the path and added extra styling to it. The problem is the new styling affects how this text is copied to clipboard. I used to copy and paste the paths into `use` statements in the code, but the new styling has extra formatting and whitespace that makes copied text unusable in Rust source code. Instead of: > std::os::unix::ffi::OsStrExt I now get: > std > :: > os > :: > unix > :: > ffi > Trait OsStrExt This change removes extra whitespace from the markup, and removes `display: flex`. Paths (now in small text) are unlikely to be that long to wrap, and even then regular text wrapping should be sufficient.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 26, 2025
Rollup of 8 pull requests Successful merges: - rust-lang#133631 (Support QNX 7.1 with `io-sock`+libstd and QNX 8.0 (`no_std` only)) - rust-lang#134358 (compiler: Set `target_abi = "ilp32e"` on all riscv32e targets) - rust-lang#135764 (Fix tests on LLVM 20) - rust-lang#135812 (Fix GDB `OsString` provider on Windows ) - rust-lang#135842 (TRPL: more backward-compatible Edition changes) - rust-lang#135946 (Remove extra whitespace from rustdoc breadcrumbs for copypasting) - rust-lang#135953 (ci.py: check the return code in `run-local`) - rust-lang#136019 (Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls) Failed merges: - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 26, 2025
Rollup of 7 pull requests Successful merges: - rust-lang#133631 (Support QNX 7.1 with `io-sock`+libstd and QNX 8.0 (`no_std` only)) - rust-lang#134358 (compiler: Set `target_abi = "ilp32e"` on all riscv32e targets) - rust-lang#135812 (Fix GDB `OsString` provider on Windows ) - rust-lang#135842 (TRPL: more backward-compatible Edition changes) - rust-lang#135946 (Remove extra whitespace from rustdoc breadcrumbs for copypasting) - rust-lang#135953 (ci.py: check the return code in `run-local`) - rust-lang#136019 (Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 26, 2025
Rollup merge of rust-lang#135946 - kornelski:rustdoc-path-space, r=notriddle Remove extra whitespace from rustdoc breadcrumbs for copypasting The docs header used to display [item names with their full path](https://doc.rust-lang.org/1.82.0/std/os/unix/ffi/trait.OsStrExt.html), but a [recent design change](https://doc.rust-lang.org/1.83.0/std/os/unix/ffi/trait.OsStrExt.html) has split the path and added extra styling to it. The problem is the new styling affects how this text is copied to clipboard. I used to copy and paste the paths into `use` statements in the code, but the new styling has extra formatting and whitespace that makes copied text unusable in Rust source code. Instead of: > std::os::unix::ffi::OsStrExt I now get: > std > :: > os > :: > unix > :: > ffi > Trait OsStrExt This change removes extra whitespace from the markup, and removes `display: flex`. Paths (now in small text) are unlikely to be that long to wrap, and even then regular text wrapping should be sufficient.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The docs header used to display item names with their full path, but a recent design change has split the path and added extra styling to it.
The problem is the new styling affects how this text is copied to clipboard. I used to copy and paste the paths into
use
statements in the code, but the new styling has extra formatting and whitespace that makes copied text unusable in Rust source code.Instead of:
I now get:
This change removes extra whitespace from the markup, and removes
display: flex
. Paths (now in small text) are unlikely to be that long to wrap, and even then regular text wrapping should be sufficient.