-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
rustdoc: DOS line endings cause extra newlines to show up in source view #76361
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcP-highHigh priorityHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Milestone
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcP-highHigh priorityHigh priorityT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried to document and publish my Windows crate to github pages.
Things went pretty smooth until I opened the source code view.
As you can see below, a newline is appended to each line doc comment,
also no line number for each line:
Here the render page on gh-pages: https://lzutao.github.io/junction/src/junction/lib.rs.html#1-111.
Beware that it has no version control for the generated doc. But the link here may work
for a limited time before github purge the cache: https://github.com/lzutao/junction/tree/6ab9e37b809afdb49fce1accf943250af6aa5dbf. Also here the the CI script I used:
https://github.com/lzutao/junction/blob/724dd2e564c76e4f92580629c2f4a1340875e890/.github/workflows/ci.yml#L62-L95.
The same code published on https://docs.rs is normal: https://docs.rs/junction/0.2.0/src/junction/lib.rs.html#1-111
Meta
rustc --version --verbose: x86_64-pc-windows-msvc rustc 1.48.0-nightly (c59199e 2020-09-04)@rustbot modify labels: T-rustdoc