Skip to content

Detect the original file newline style and apply it to rendered template#1159

Closed
franciscomoma wants to merge 7 commits intocookiecutter:masterfrom
franciscomoma:detect-original-line-endings
Closed

Detect the original file newline style and apply it to rendered template#1159
franciscomoma wants to merge 7 commits intocookiecutter:masterfrom
franciscomoma:detect-original-line-endings

Conversation

@franciscomoma
Copy link
Copy Markdown
Contributor

Hello! I've seen that this issue was still open, and I decided to fix it detecting the original file ending style and applying it to the rendered new file.

I've also added a .gitattributes file to set CRLF to files that ends with *crlf.txt.

@dchimeno
Copy link
Copy Markdown

This solves my problem with Windows, any way this could be merge?

@tiangolo
Copy link
Copy Markdown

I think this is bitting several Windows users for some of the Cookiecutter project generators I have: tiangolo/full-stack-fastapi-couchbase#8, fastapi/full-stack-fastapi-template#13

I guess this is probably bitting many more users of other Cookiecutters.

Is there a chance a maintainer can take a look at this PR? Is there any help we can provide?

@Hickstone
Copy link
Copy Markdown

We are also affected by this. This would solve many problems with generated unix files on windows.

@insspb insspb added feature This issue/PR relates to major feature request. breaking-change Marks an important and likely breaking change. Require update for major version and removed enhancement This issue/PR relates to a feature request. needs-review PR Only: This PR require review from other developer labels May 27, 2020
@insspb insspb added the WIP Work In Progress label May 27, 2020
@insspb insspb self-assigned this May 27, 2020
@insspb
Copy link
Copy Markdown
Member

insspb commented May 27, 2020

@franciscomoma
Thank you for contribution.

Merged to #1407
Will be in 2.0

@insspb insspb closed this May 27, 2020
@franciscomoma
Copy link
Copy Markdown
Contributor Author

@franciscomoma
Thank you for contribution.

Merged to #1407
Will be in 2.0

Thank you so much!

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

Labels

breaking-change Marks an important and likely breaking change. Require update for major version feature This issue/PR relates to major feature request. WIP Work In Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants