-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Autocorrected CRLF to LF #4943
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
Autocorrected CRLF to LF #4943
Conversation
573ccf1
to
59e94e0
Compare
Add |
@daxian-dbw that's an awesome tip! |
|
||
'@ | ||
"@ | ||
$result | should match "\r?\nfoo``u\{2195\}abc\r?\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, one question about \r?\n
here. Is it because we use CRLF on windows and LF on Unix? If so, can we do the following instead?
$newLine = [System.Environment]::NewLine
$result | should be "${newLine}foo``u\{2195\}abc${newLine}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is because git converts files to CRLF on Windows. I like your suggestion and will make the change.
59e94e0
to
5a35a4a
Compare
@daxian-dbw I'm going to revert that last change, seems that on Windows you might have git set to not convert to CRLF which may be why it's failing on AppVeyor as it was just LF. |
This reverts commit 5a35a4a342581545cc3d22ec608c03d50ccebc85.
b246869
to
ac69b4c
Compare
Fixed Parser.Tests.ps1 to use regex: