Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix(ui): Fix issue with comment mentioning misbehavior

robin77c8bf044187
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsx
index 2df82b81..787cc3b3 100644
--- a/ui/src/components/Comment/index.tsx
+++ b/ui/src/components/Comment/index.tsx
@@ -102,13 +102,14 @@ const Comment = ({ objectId, mode, commentId }) => {
const handleSendReply = (item) => {
const users = matchedUsers(item.value);
const userNames = unionBy(users.map((user) => user.userName));
- const html = marked.parse(parseUserInfo(item.value));
- if (!item.value || !html) {
+ const commentMarkDown = parseUserInfo(item.value);
+ const html = marked.parse(commentMarkDown);
+ if (!commentMarkDown || !html) {
return;
}
const params = {
object_id: objectId,
- original_text: item.value,
+ original_text: commentMarkDown,
mention_username_list: userNames,
parsed_text: html,
...(item.type === 'reply'