Skip to content

Replace nbsp in all rustdoc code blocks #107615

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

Merged
merged 1 commit into from
Feb 4, 2023

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Feb 2, 2023

Based on #106125 by @dtolnay — this PR fixes the line wrapping bug.

Fixes #106098. This makes code copyable from rustdoc rendered documentation into a Rust source file.

@rustbot 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 Feb 2, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 2, 2023

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 3, 2023

📌 Commit e7214631540db696c897616e3d461283be3b3d38 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors 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 Feb 3, 2023
@GuillaumeGomez
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 3, 2023
Co-Authored-By: David Tolnay <dtolnay@gmail.com>
@GuillaumeGomez
Copy link
Member

Thanks! r=me once CI pass.

@notriddle
Copy link
Contributor Author

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 3, 2023

📌 Commit 784665d has been approved by notriddle

It is now in the queue for this repository.

@bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 3, 2023
@notriddle
Copy link
Contributor Author

@bors r-

@bors r=GuillaumeGomez rollup

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 3, 2023
@bors
Copy link
Collaborator

bors commented Feb 3, 2023

📌 Commit 784665d has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 3, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 3, 2023
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#106887 (Make const/fn return params more suggestable)
 - rust-lang#107519 (Add type alias for raw OS errors)
 - rust-lang#107551 ( Replace `ConstFnMutClosure` with const closures )
 - rust-lang#107595 (Retry opening proc-macro DLLs a few times on Windows.)
 - rust-lang#107615 (Replace nbsp in all rustdoc code blocks)
 - rust-lang#107621 (Intern external constraints in new solver)
 - rust-lang#107631 (loudly tell people when they change `Cargo.lock`)
 - rust-lang#107632 (Clarifying that .map() returns None if None.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f7210b3 into rust-lang:master Feb 4, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 4, 2023
@notriddle notriddle deleted the notriddle/nbsp branch February 7, 2023 17:45
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 8, 2023
…aumeGomez

rustdoc: use a newline instead of `<br>` to format code headers

Since these elements now use `white-space: pre-wrap` since rust-lang#107615, it's fine to use newlines for formatting, which is smaller and a bit less complicated.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 8, 2023
…aumeGomez

rustdoc: use a newline instead of `<br>` to format code headers

Since these elements now use `white-space: pre-wrap` since rust-lang#107615, it's fine to use newlines for formatting, which is smaller and a bit less complicated.
# for free to join this conversation on GitHub. Already have an account? # 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of &nbsp; by rustdoc makes APIs not copyable into Rust source code
5 participants