# gpui: Treat typographic apostrophes as word characters for line wrapping \(\#51973\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/55a59ca17d44ebf12fee6edc07ac9ee3a1e33268)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 55a59ca17d44ebf12fee6edc07ac9ee3a1e33268

Requested commit: 55a59ca17d44ebf12fee6edc07ac9ee3a1e33268

Commit: 55a59ca17d44ebf12fee6edc07ac9ee3a1e33268

Tree: 076d4ad8cb63d06e2d9d78b0c8b19ce8f4aadd2b

Author: Eric Holk

Committer: GitHub

## Message

```
gpui: Treat typographic apostrophes as word characters for line wrapping (#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").
```

## Parents

- [d344d7f1c5fe14f3dcd0c5743a81c6ff1a6d49a6](https://git.cafe/gitcafe/zed/commit/d344d7f1c5fe14f3dcd0c5743a81c6ff1a6d49a6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/55a59ca17d44ebf12fee6edc07ac9ee3a1e33268?format=markdown)
