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

Cross-platform issues caused by different changelog line endings #34

Open
jayxx1234 opened this issue Aug 10, 2020 · 3 comments
Open

Cross-platform issues caused by different changelog line endings #34

jayxx1234 opened this issue Aug 10, 2020 · 3 comments

Comments

@jayxx1234
Copy link

When a changelog is produced on one platform (e.g. MacOS), with it's style of line endings (e.g. LF), when trying to run the changelog-parser on another platform (e.g. Windows), it tries to use the current OS'es line endings style (e.g. CRLF), and will parse the entire file as one 'line'.

An option should be added to be able to supply a custom line endings style (or automatically detect style from changelog file), so that this can be used in source-controlled projects across multiple platforms.

@ungoldman
Copy link
Owner

I think detecting line endings would be better than creating a very unusual custom line endings option.

PRs welcome!

@jayxx1234
Copy link
Author

I added the custom line endings option so that in (unusual) cases where the changelog uses multiple line endings (and you don't want the most common one), or line endings other than CR, LF, or CRLF, you have the ability to specify it yourself (I don't see this being a likely occurrence, but it was easy enough to add)

@bcomnes
Copy link
Collaborator

bcomnes commented Dec 22, 2021

I just ran the test suite on Mac windows and linux and it passed. Windows git does some wacky stuff with line endings, but if git for windows is configured right, it should work fine. Im nervous this adds additional complexity for what boils down to a misconfiguration with windows git.

If I understand correctly, this package currently assumes files will be using line endings appropriate for the OS its running on, and is choking when using line endings that don't match what the OS is set to use, to which the correct solution is, use line endings correct for the OS.

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

Successfully merging a pull request may close this issue.

3 participants