mirror of
https://github.com/plankanban/planka.git
synced 2025-12-25 17:25:01 +03:00
ref: Little refactoring
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
const MENTIONS_REGEX = /@\[(.*?)\]\(.*?\)/g;
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export const formatTextWithMentions = (text) => text.replace(MENTIONS_REGEX, '@$1');
|
||||
9
client/src/utils/mentions.js
Normal file
9
client/src/utils/mentions.js
Normal 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');
|
||||
Reference in New Issue
Block a user