Skip to content

Commit

Permalink
fix: remove the comma after collaped or grouped mentions #2464
Browse files Browse the repository at this point in the history
  • Loading branch information
zenghawtin committed Feb 25, 2024
1 parent cadf1b4 commit ac208d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions composables/content-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac208d3

Please sign in to comment.