mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-14 21:09:58 +00:00
fix: remove the comma after collaped or grouped mentions #2464
This commit is contained in:
parent
cadf1b4a7c
commit
ac208d375a
1 changed files with 5 additions and 0 deletions
|
@ -568,6 +568,11 @@ function transformCollapseMentions(status?: mastodon.v1.Status, inReplyToStatus?
|
||||||
if (child.type === TEXT_NODE) {
|
if (child.type === TEXT_NODE) {
|
||||||
trimContentStart = () => {
|
trimContentStart = () => {
|
||||||
child.value = child.value.trimStart()
|
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
|
// remove <br> after mention
|
||||||
|
|
Loading…
Reference in a new issue