mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-10 12:26:36 +00:00
add support for newline character and semicolon seperated emails when… (#14092)
* add support for newline character and semicolon seperated emails when sharing with collaborators * edited existing paste event to check for (and replace) white space, comma, new line and semi colon seperated emails GitOrigin-RevId: 53eadd0ca662a2f54312294f6779cfcf3f0f2fd7
This commit is contained in:
parent
646d2fa901
commit
2c511c9a0d
2 changed files with 3 additions and 2 deletions
|
@ -215,7 +215,7 @@ export default function SelectCollaborators({
|
|||
|
||||
if (data) {
|
||||
const emails = data
|
||||
.split(/\s*,\s*/)
|
||||
.split(/[\r\n,; ]+/)
|
||||
.filter(item => item.includes('@'))
|
||||
|
||||
if (emails.length) {
|
||||
|
|
|
@ -595,7 +595,8 @@ describe('<ShareProjectModal/>', function () {
|
|||
fireEvent.paste(inputElement, {
|
||||
clipboardData: {
|
||||
getData: () =>
|
||||
'test@example.com, foo@example.com, bar@example.com, a@b.c',
|
||||
`test@example.com; foo@example.com
|
||||
bar@example.com, a@b.c`,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue