Skip to content
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

[Guess] Looks like we have CRLF sneaked to the source code tree #461

Open
USSX-Hares opened this issue Aug 4, 2023 · 4 comments · May be fixed by #467
Open

[Guess] Looks like we have CRLF sneaked to the source code tree #461

USSX-Hares opened this issue Aug 4, 2023 · 4 comments · May be fixed by #467
Labels
bug Something isn't working

Comments

@USSX-Hares
Copy link
Collaborator

USSX-Hares commented Aug 4, 2023

Description

I was browsing the project documentation and noticed that all source code snippets have an extra newline after each normal line.
This is usually caused by some software processing CRLF as two separate and independent newline symbols.

Code snippet that reproduces the issue

https://lidatong.github.io/dataclasses-json/reference/dataclasses_json/api/

image

@USSX-Hares USSX-Hares added the bug Something isn't working label Aug 4, 2023
@george-zubrienko
Copy link
Collaborator

Yeah windows users leaking the poison into the source :) Unfortunately, we can't update the line-endings only since git will ignore that, but we can add .gitattributes file that forces commits to be LF?

@USSX-Hares
Copy link
Collaborator Author

Yeah windows users leaking the poison into the source :) Unfortunately, we can't update the line-endings only since git will ignore that, but we can add .gitattributes file that forces commits to be LF?

Actually, committing the EoL changes only is possible, but that drastically garbages the Git history.
I've done that kind of purification a few times for my own repos.

@USSX-Hares
Copy link
Collaborator Author

As a workaround for the documentation page, I can suggest adding core.autocrlf = input option to the GitHub Workflows checkout config.

@george-zubrienko
Copy link
Collaborator

Will send a PR later this week

@george-zubrienko george-zubrienko linked a pull request Aug 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants