Skip to content
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

Fix span relocation #14

Merged
merged 2 commits into from
Jan 1, 2025
Merged

Fix span relocation #14

merged 2 commits into from
Jan 1, 2025

Conversation

museun
Copy link
Owner

@museun museun commented Jan 1, 2025

No description provided.

museun added 2 commits January 1, 2025 00:53
previously when it encounters a grapheme cluster
it should find the floor/ceil position of the
continuation byte to index into the span string

this uses a copy of two unstable functions from std:
`str::floor_char_boundary`
`str::ceil_char_boundary`
which are tracked here: rust-lang/rust#93743

when this becomes stable, we can just rely on std.
but for now they are fine. (even if they are
obviously inefficient)
@museun museun merged commit ef9e796 into main Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant