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 bug in segmenter involving short strings of complex scripts #3341

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

sffc
Copy link
Member

@sffc sffc commented Apr 17, 2023

The bug was that short strings of complex script (more precisely, those with no interior breakpoints) would cause the segmenter to runaway to the end of the string.

I also added an assertion that will fail if this happens again.

@sffc sffc changed the title Start debugging Segmenter bug Fix bug in segmenter involving short strings of complex scripts Apr 17, 2023
@sffc sffc marked this pull request as ready for review April 17, 2023 22:57
Copy link
Contributor

@aethanyc aethanyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this bug! LGTM.

@makotokato should also take a look in case I missed anything.

Nit: We should probably rename complex_word.rs to complex_script.rs since it contains tests for line segmenter now.

@sffc
Copy link
Member Author

sffc commented Apr 18, 2023

I will merge in an effort to push 1.2.1 sooner rather than later.

@sffc sffc merged commit 502c9ff into unicode-org:main Apr 18, 2023
@sffc sffc deleted the segmenter-debug branch April 18, 2023 04:59
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.

2 participants