Skip to content

gpui: Trim trailing whitespace and punctuation before ellipsis#57106

Merged
danilo-leal merged 1 commit into
mainfrom
trim-trailing-before-ellipsis
May 19, 2026
Merged

gpui: Trim trailing whitespace and punctuation before ellipsis#57106
danilo-leal merged 1 commit into
mainfrom
trim-trailing-before-ellipsis

Conversation

@ConradIrwin

Copy link
Copy Markdown
Member

When truncating text at the end with an ellipsis, the truncation point can land right after a space or punctuation character, producing results like "some text …" or "some text-…".

This trims trailing whitespace and ASCII punctuation from the truncated prefix before appending the ellipsis affix, so you get clean results like "some text…" instead.

Release Notes:

  • Improved text truncation to avoid trailing spaces or punctuation before the ellipsis.

When truncating text with an ellipsis at the end, the truncation point
can land right after a space or punctuation character, producing results
like "some text …" or "some text-…". This trims trailing whitespace
and ASCII punctuation from the truncated prefix before appending the
ellipsis affix.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 19, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label May 19, 2026
@danilo-leal danilo-leal added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 46b08f9 May 19, 2026
45 checks passed
@danilo-leal danilo-leal deleted the trim-trailing-before-ellipsis branch May 19, 2026 11:49
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request May 20, 2026
…ndustries#57106)

When truncating text at the end with an ellipsis, the truncation point
can land right after a space or punctuation character, producing results
like `"some text …"` or `"some text-…"`.

This trims trailing whitespace and ASCII punctuation from the truncated
prefix before appending the ellipsis affix, so you get clean results
like `"some text…"` instead.

Release Notes:

- Improved text truncation to avoid trailing spaces or punctuation
before the ellipsis.
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
…ndustries#57106)

When truncating text at the end with an ellipsis, the truncation point
can land right after a space or punctuation character, producing results
like `"some text …"` or `"some text-…"`.

This trims trailing whitespace and ASCII punctuation from the truncated
prefix before appending the ellipsis affix, so you get clean results
like `"some text…"` instead.

Release Notes:

- Improved text truncation to avoid trailing spaces or punctuation
before the ellipsis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants