an-cabal / an-rope

an rope data structure
https://docs.rs/an-rope
MIT License
11 stars 2 forks source link

Rope split() and split_whitespace() also broken when strings split across multiple nodes #61

Open hawkw opened 7 years ago

hawkw commented 7 years ago

Although we fixed the Rope.lines() iterator (#58), I think the same problem also exists for the split() and split_whitespace() iterators.

The fix-split-whitespace branch adds tests demonstrating this incorrect behaviour.

hawkw commented 7 years ago

I think we can fix this in much the same way as we fixed #58, so there's example code to work off of. I'm not going to tag this as "easy", though, since the solution is still fairly complex. If anybody else is feeling up to it, feel free to assign this to yourself; otherwise, I'm happy to take care of it.

hawkw commented 7 years ago

I added tests for this in the fix-split-whitespace branch, bdebff5117f1aefdf8f269c94735502ed7d7ee12.