Files
plane/web/helpers/notification.helper.ts
guru_sainath 7c4c777c99 [WEB-1696] chore: rendering mention comments in notification modal (#4903)
* chore: rendering mention comments in notification modal

* chore: resolved build errors

* chore: updated workflow

* chore: updated function name and handled the notification mention render
2024-06-24 17:13:17 +05:30

9 lines
329 B
TypeScript

import { stripAndTruncateHTML } from "./string.helper";
export const sanitizeCommentForNotification = (mentionContent: string | undefined) =>
mentionContent
? stripAndTruncateHTML(
mentionContent.replace(/<mention-component\b[^>]*\blabel="([^"]*)"[^>]*><\/mention-component>/g, "$1")
)
: mentionContent;