Fix avatar text issue in rte (#10559)

* replace - with zwsp

* improve comments

* fix broken tests

* fix typo
This commit is contained in:
alunturner 2023-04-11 09:13:48 +01:00 committed by GitHub
parent 29780704f1
commit 96c62ea03d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -173,7 +173,7 @@ describe("getMentionAttributes", () => {
expect(result).toEqual({
"data-mention-type": "user",
"style": `--avatar-background: url(${testAvatarUrlForMember}); --avatar-letter: '-'`,
"style": `--avatar-background: url(${testAvatarUrlForMember}); --avatar-letter: '\u200b'`,
});
});
@ -200,7 +200,7 @@ describe("getMentionAttributes", () => {
expect(result).toEqual({
"data-mention-type": "room",
"style": `--avatar-background: url(${testAvatarUrlForRoom}); --avatar-letter: '-'`,
"style": `--avatar-background: url(${testAvatarUrlForRoom}); --avatar-letter: '\u200b'`,
});
});