1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00

ref: Little refactoring

This commit is contained in:
Maksim Eltyshev 2025-06-06 12:34:09 +02:00
parent 585464eef3
commit 63de346b0e
8 changed files with 42 additions and 28 deletions

View file

@ -0,0 +1,9 @@
/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
export const MENTION_REGEX = /@\[(.*?)\]\((.*?)\)/g;
export const MENTION_NAME_REGEX = /@\[(.*?)\]\(.*?\)/g;
export const formatTextWithMentions = (text) => text.replace(MENTION_NAME_REGEX, '@$1');