lidatong/dataclasses-json

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

Opened this issue · 4 comments

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

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?

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.

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

Will send a PR later this week