Repository navigation
Commit beaea4d
committed
fix(shared): long assistant quote chips no longer end in a broken character
assistantCitationLabel cut a quote or its comment at 64 UTF-16 code
units. When an emoji straddled the cut, the label kept only its high
surrogate, so it ended in a replacement character before the ellipsis.
That shows in the quote chip of a sent message on a desktop-width window,
in the chip's screen-reader labels and in the text find-in-thread
searches. The composer chip clips its label to one 16em line, so the
broken end never shows there.
The cut now steps back one unit when it would land between a high and a
low surrogate, the same check #29158 added to context chip labels.
Bug: a long assistant quote chip ends in a broken character when an emoji sits at the cut1 parent b8523ed commit beaea4d
1 file changed
Lines changed: 8 additions & 1 deletion
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| |||
0 commit comments