-
Notifications
You must be signed in to change notification settings - Fork 21
StringLike#linesIterator not properly splitting on \r #11241
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
Comments
|
Should |
Compatibility with OTOH, Padding of When I Since the future of scala is opinionated, it has the option of ignoring line separator and |
Not just |
As another data point, CR is a line break for regexes, also matched by |
Could someone take this one and implement compat with |
Because Scala recognizes FF, I just juiced the current code. I would propose that FF be taken only if not preceded by a line terminator, since normally, FF would not introduce a line:
but for now I left it as it. FF affects line numbering in the compiler, IIRC. |
scala/scala#7699 doesn't recognize FF, since Java's |
Rust issue 55743 covers the same territory. |
This fails to split and returns a single string:
This is inconsistent with the JVM
String#lines: java.util.stream.Stream[String]
method:The standard
java.io.BufferedReader#readLines
method:Or other languages like Python
Shouldn't it do the same thing?
The text was updated successfully, but these errors were encountered: