fix: remove the comma after collaped or grouped mentions #2464

pull/2620/head
zenghawtin 2024-02-25 12:01:50 +08:00
rodzic cadf1b4a7c
commit ac208d375a
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -568,6 +568,11 @@ function transformCollapseMentions(status?: mastodon.v1.Status, inReplyToStatus?
if (child.type === TEXT_NODE) {
trimContentStart = () => {
child.value = child.value.trimStart()
// remove the comma after the collapsed mention.
if (child.value.at(0) === ',') {
child.value = child.value.slice(1)
child.value = child.value.trimStart()
}
}
}
// remove <br> after mention