-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Inconsistency in whether trailing \r\n is included in the results json #1095
Comments
Yeah, I suspect this is a bug. I can definitely reproduce it. Interestingly, if you don't use |
We actually found a worse instance of this bug. I assume it's the same issue, I can open a new one if you prefer. Search for \n in a CRLF document
We get two
|
This reverts commit 499c7c7. See BurntSushi/ripgrep#1095
Thanks for this report. This was a pretty gnarly bug, and it turned out that I tried to hack around it pretty poorly. I think the fix for this should make ripgrep's CRLF hack a bit more robust in general though, so I hope things work better now! |
0.10.0, Mac and Win
The
--crlf
flag has an unexpected side effect, that it changes whether the trailing\r\n
is included in the json output. Very minor issue. I'm not sure which way is right.Searching a
\r\n
document. When--crlf
is not given, the trailing\r\n
in "text" is included:When
--crlf
is included, the trailing\r\n
in "text" is not included:But when searching a
\n
document, the trailing\n
is always included:The text was updated successfully, but these errors were encountered: