Skip to content

Rustdoc: long lines are escaping text code blocks #87043

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

Closed
WaffleLapkin opened this issue Jul 10, 2021 · 4 comments · Fixed by #87056
Closed

Rustdoc: long lines are escaping text code blocks #87043

WaffleLapkin opened this issue Jul 10, 2021 · 4 comments · Fixed by #87056
Labels
C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@WaffleLapkin
Copy link
Member

Repro:

/// ```text
/// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
/// ```
/// ```rust
/// bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
/// ```
pub struct Item;

Rustdoc output:
image

It seems that only code block with text language are affected.

cc @GuillaumeGomez

Meta

; rustdoc --version --verbose
rustdoc 1.55.0-nightly (240ff4c4a 2021-07-09)
binary: rustdoc
commit-hash: 240ff4c4a0d0936c9eeb783fa9ff5c0507a6ffb4
commit-date: 2021-07-09
host: x86_64-unknown-linux-gnu
release: 1.55.0-nightly
LLVM version: 12.0.1
@WaffleLapkin WaffleLapkin added the C-bug Category: This is a bug. label Jul 10, 2021
@jonas-schievink jonas-schievink added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jul 10, 2021
@WaffleLapkin
Copy link
Member Author

A quick test showed that the bug was introduced in nightly-2021-06-30 (i.e.: nightly-2021-06-29 works fine)

@WaffleLapkin
Copy link
Member Author

@rustbot label +regression-from-stable-to-nightly

@rustbot rustbot added regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jul 10, 2021
@GuillaumeGomez
Copy link
Member

Thanks, I'll fix it in the next hours.

@GuillaumeGomez
Copy link
Member

In case you want to take a look to the fix, it's #87056.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jul 13, 2021
…low, r=notriddle

Fix codeblocks overflow

Fixes rust-lang#87043.

Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes.

r? `@Nemo157`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jul 13, 2021
…low, r=notriddle

Fix codeblocks overflow

Fixes rust-lang#87043.

Instead of completely relying on `pulldown-cmark` (and its potential changes), I decided to move the generation of codeblocks HTML directly in rustdoc so we can unify the DOM and the CSS classes.

r? ``@Nemo157``
@bors bors closed this as completed in 57e021c Jul 14, 2021
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label May 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants