-
Couldn't load subscription status.
- Fork 1.4k
Fix ZTransducer.splitLines #3690
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
Conversation
06d667c to
34a291a
Compare
|
@simpadjo Could you review this? |
|
@iravid LGTM! But it doesn't catch this particular issue. Maybe you could improve the generator. Although it does catch something. Could be added anyway. |
| .fromChunks(Chunk("aa", "bb"), Chunk("\nbbc\n", "ddb", "bd"), Chunk("abc", "\n"), Chunk("abc")) | ||
| .transduce(ZTransducer.splitLines) | ||
| .runCollect | ||
| )(equalTo(List("aabb", "bbc", "ddbbdabc", "abc"))) |
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.
| )(equalTo(List("aabb", "bbc", "ddbbdabc", "abc"))) | |
| )(equalTo(List("aabb", "theguardian", "ddbbdabc", "abc"))) |
π€£
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.
π€£
|
@simpadjo I will follow up with a better generator. If you want to pick that up, the idea is to:
|
Fixes #3659.
We were already pulling the leftover into the
carry, so concatenating it to the chunk was redundant.I was going to write a smarter generator to catch this, but ran out of time.