Skip to content

Rustdoc source code output dislikes windows line endings #25182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue May 7, 2015 · 0 comments · Fixed by #25219
Closed

Rustdoc source code output dislikes windows line endings #25182

ghost opened this issue May 7, 2015 · 0 comments · Fixed by #25219
Labels
O-windows Operating system: Windows T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@ghost
Copy link

ghost commented May 7, 2015

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() {}
@steveklabnik steveklabnik added O-windows Operating system: Windows T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels May 7, 2015
bors added a commit that referenced this issue May 15, 2015
Fixes #25182, parser didn't account for \r\n in regular comments, only doc-comments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows 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.

1 participant