Skip to content

rustdoc: DOS line endings cause extra newlines to show up in source view #76361

Closed

Description

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:

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcP-highHigh priorityT-rustdocRelevant 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.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions