* chore: rendering mention comments in notification modal * chore: resolved build errors * chore: updated workflow * chore: updated function name and handled the notification mention render
8 lines
329 B
TypeScript
8 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;
|