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

fix Patch file parse error in windows #1

Closed
wants to merge 1 commit into from

Conversation

bill2004158
Copy link
Owner

@bill2004158 bill2004158 commented Mar 18, 2021

fix new line for windows.

fix new line for windows
@bill2004158
Copy link
Owner Author

bill2004158 commented Mar 18, 2021

in windows, the line break is "\r\n". (while it is "\n" in Linux/Unix).
so after split by "\n",
then first char of blank line will be "\r" for window.

so "Treat blank lines as context" should include "\r".

@YoussefZidan
Copy link

Error fixed in windows

I'm using Windows and VS Code and I just changed the end of line sequence to be LF instead of CRLF in the patch file and the problem solved.

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

Successfully merging this pull request may close these issues.

2 participants