We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Text files created on DOS/Windows machines have different line endings than files created on Unix/Linux. DOS uses carriage return and line feed ("\r\n") as a line ending, which Unix uses just line feed ("\n"). Source: http://www.cs.toronto.edu/~krueger/csc209h/tut/line-endings.html#:~:text=Text%20files%20created%20on%20DOS,(%22%5Cn%22).
Darker should not modify the line ending as it results in false-positives.
E.g.
\r\n
\n
Black on the other hand tries to check for the proper line ending newline = "\r\n" if b"\r\n" == lines[0][-2:] else "\n"
newline = "\r\n" if b"\r\n" == lines[0][-2:] else "\n"
The text was updated successfully, but these errors were encountered:
@akaihola I think I can handle this at sometime during the week
Sorry, something went wrong.
Keep encoding and newlines intact. Fixes #115.
51a791c
@Pacu2, I thought about this a bit and figured that the file encoding should also be handled correctly. Please see #117.
ef21f1f
Merge pull request #117 from akaihola/detect-line-ending
dea919e
Pacu2
Successfully merging a pull request may close this issue.
Darker should not modify the line ending as it results in false-positives.
E.g.
\r\n
\r\n
line ending is changed to\n
Black on the other hand tries to check for the proper line ending
newline = "\r\n" if b"\r\n" == lines[0][-2:] else "\n"
The text was updated successfully, but these errors were encountered: