feat: improve user assignments via quick add magic #3348

Merged
konrad merged 18 commits from feature/better-user-search-assignees into main 2023-06-05 15:03:16 +00:00
Showing only changes of commit 7b6a13dd52 - Show all commits

View File

@ -280,13 +280,16 @@ const getRepeats = (text: string): repeatParsedResult => {
export const cleanupItemText = (text: string, items: string[], prefix: string): string => {
items.forEach(l => {
if (l === '') {
return
}
text = text
.replace(`${prefix}'${l}' `, '')
.replace(`${prefix}'${l}'`, '')
.replace(`${prefix}"${l}" `, '')
.replace(`${prefix}"${l}"`, '')
.replace(`${prefix}${l} `, '')
.replace(`${prefix}${l}`, '')
.replace(new RegExp(`\\${prefix}'${l}' `, 'ig'), '')
.replace(new RegExp(`\\${prefix}'${l}'`, 'ig'), '')
.replace(new RegExp(`\\${prefix}"${l}" `, 'ig'), '')
.replace(new RegExp(`\\${prefix}"${l}"`, 'ig'), '')
.replace(new RegExp(`\\${prefix}${l} `, 'ig'), '')
.replace(new RegExp(`\\${prefix}${l}`, 'ig'), '')
})
return text
}