Skip to content

gpui: Treat typographic apostrophes as word characters for line wrapping#51973

Merged
eholk merged 2 commits intozed-industries:mainfrom
eholk:fix-curly-apostrophe-wrap
Mar 19, 2026
Merged

gpui: Treat typographic apostrophes as word characters for line wrapping#51973
eholk merged 2 commits intozed-industries:mainfrom
eholk:fix-curly-apostrophe-wrap

Conversation

@eholk
Copy link
Copy Markdown
Contributor

@eholk eholk commented Mar 19, 2026

The line wrapper's is_word_char function included the ASCII apostrophe (U+0027) but not the typographic right single quotation mark ' (U+2019) or left single quotation mark ' (U+2018). When Markdown rendering produces curly quotes, words like won't were being split at the apostrophe during line wrapping, producing won at the end of one line and 't at the start of the next.

This adds both typographic quote characters to is_word_char so they are treated the same as the ASCII apostrophe.

Release Notes:

  • Fixed line wrapping splitting words at typographic apostrophes (e.g. "won't" breaking as "won" / "'t").

The line wrapper's is_word_char function included the ASCII apostrophe
(U+0027) but not the typographic right single quotation mark (U+2019)
or left single quotation mark (U+2018). When Markdown rendering
produces curly quotes, words like won't were being split at the
apostrophe during line wrapping.
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 19, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, SomeoneToIgnore and dinocosta and removed request for a team March 19, 2026 20:31
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 19, 2026
@eholk eholk enabled auto-merge (squash) March 19, 2026 20:41
@eholk eholk merged commit 55a59ca into zed-industries:main Mar 19, 2026
29 of 30 checks passed
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 20, 2026
…ing (zed-industries#51973)

The line wrapper's `is_word_char` function included the ASCII apostrophe
(U+0027) but not the typographic right single quotation mark `'`
(U+2019) or left single quotation mark `'` (U+2018). When Markdown
rendering produces curly quotes, words like `won't` were being split at
the apostrophe during line wrapping, producing `won` at the end of one
line and `'t` at the start of the next.

This adds both typographic quote characters to `is_word_char` so they
are treated the same as the ASCII apostrophe.

Release Notes:

- Fixed line wrapping splitting words at typographic apostrophes (e.g.
"won't" breaking as "won" / "'t").
toshmukhamedov pushed a commit to toshmukhamedov/zed that referenced this pull request Mar 20, 2026
…ing (zed-industries#51973)

The line wrapper's `is_word_char` function included the ASCII apostrophe
(U+0027) but not the typographic right single quotation mark `'`
(U+2019) or left single quotation mark `'` (U+2018). When Markdown
rendering produces curly quotes, words like `won't` were being split at
the apostrophe during line wrapping, producing `won` at the end of one
line and `'t` at the start of the next.

This adds both typographic quote characters to `is_word_char` so they
are treated the same as the ASCII apostrophe.

Release Notes:

- Fixed line wrapping splitting words at typographic apostrophes (e.g.
"won't" breaking as "won" / "'t").
AmaanBilwar pushed a commit to AmaanBilwar/zed that referenced this pull request Mar 23, 2026
…ing (zed-industries#51973)

The line wrapper's `is_word_char` function included the ASCII apostrophe
(U+0027) but not the typographic right single quotation mark `'`
(U+2019) or left single quotation mark `'` (U+2018). When Markdown
rendering produces curly quotes, words like `won't` were being split at
the apostrophe during line wrapping, producing `won` at the end of one
line and `'t` at the start of the next.

This adds both typographic quote characters to `is_word_char` so they
are treated the same as the ASCII apostrophe.

Release Notes:

- Fixed line wrapping splitting words at typographic apostrophes (e.g.
"won't" breaking as "won" / "'t").
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.

3 participants