Skip to content

Fix cell_len crash when string ends with ZWJ#3952

Closed
ChimdumebiNebolisa wants to merge 2 commits intoTextualize:masterfrom
ChimdumebiNebolisa:fix-3947-zwj
Closed

Fix cell_len crash when string ends with ZWJ#3952
ChimdumebiNebolisa wants to merge 2 commits intoTextualize:masterfrom
ChimdumebiNebolisa:fix-3947-zwj

Conversation

@ChimdumebiNebolisa
Copy link

Fixes #3947

Guard against StopIteration when encountering a trailing \u200d in cell_len.
Adds regression test tests/test_zwj_cell_len.py.

Copy link

@xiangxiangxiong9 xiangxiangxiong9 left a comment

Choose a reason for hiding this comment

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

I tested it on my device and it can fix this issue

@willmcgugan
Copy link
Member

Thanks. Going with #3953

@willmcgugan willmcgugan closed this Feb 1, 2026
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.

[BUG] If the text contains '\u200d', console.print may throw a RuntimeError

3 participants