Skip to content

Rustdoc source code output dislikes windows line endings #25182

@ghost

Description

Image says it all really, running rustdoc on files with windows style line-endings inserts (or doesn't strip?) additional newline characters, screwing up alignment with the line numbers:
image

This only seems to affect regular comments, doc comments are fine.

Edit: since it's not really obvious from the image due to the nature of the bug, it should look like this:

// Test comment
pub fn test() {}

// Test comment
pub fn test2() {}

// Test comment
pub fn test3() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-windowsOperating system: WindowsT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions