You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
EllipsisMiddleTruncate exceeds requested width when only the ellipsis fits #722
EllipsisMiddleTruncate returns more characters than the requested width when available_space is 3. It also modifies strings that already fit exactly within the specified width.
I'd like to work on this. I reproduced both examples on current master. I'll add regression tests for the ellipsis-sized and exact-fit boundaries, fix the middle truncation logic, and preserve the existing fallback to the full line width when fewer than three characters are available.
Activity
hugosmoreira commentedon Oct 26, 2026
I'd like to work on this. I reproduced both examples on current master. I'll add regression tests for the ellipsis-sized and exact-fit boundaries, fix the middle truncation logic, and preserve the existing fallback to the full line width when fewer than three characters are available.
fix: handle middle truncation boundary widths (google#722)
test: cover middle truncation edge cases (google#722)