From ac208d375afccc30b683668992dc44a9b64ee4f9 Mon Sep 17 00:00:00 2001 From: zenghawtin Date: Sun, 25 Feb 2024 12:01:50 +0800 Subject: [PATCH] fix: remove the comma after collaped or grouped mentions #2464 --- composables/content-parse.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composables/content-parse.ts b/composables/content-parse.ts index 7f6745ba..d591d9cf 100644 --- a/composables/content-parse.ts +++ b/composables/content-parse.ts @@ -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
after mention