Open
Description
If you make just a small change to the Graphemes::next
method then this breaks the tests in graphemes_test
because the GraphemeCursor::next_boundary
returns GraphemeIncomplete::PreContext(1)
. As far as I understand, this indicates that the cursor tries to look back at preceding grapheme clusters that it has already processed. I don't know if this behavior is intentional or required to process UTF-8 correctly, but it seems unnecessary because the tests do pass if you just use a fresh cursor instead and treat your current position as the start of the string. Some performance improvements might be possible if you do it that way.
Metadata
Metadata
Assignees
Labels
No labels