Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mixins/richEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Vue from 'vue'
const MENTION_START = /(?=[a-z0-9_\-@.'])\B/.source
// Capturing groups like: @user-id, @"guest/abc16def", @"federated_user/user-id", @"user-id with space"
const MENTION_SIMPLE = /(@[a-z0-9_\-@.']+)/.source
const MENTION_GUEST = /@"guest\/[a-f0-9]+"/.source
const MENTION_GUEST = /@"(?:guest|email){1}\/[a-f0-9]+"/.source
const MENTION_PREFIXED = /@"(?:federated_)?(?:group|team|user){1}\/[a-z0-9_\-@.' /:]+"/.source
const MENTION_WITH_SPACE = /@"[a-z0-9_\-@.' ]+"/.source
const MENTION_COMPLEX = `(${MENTION_GUEST}|${MENTION_PREFIXED}|${MENTION_WITH_SPACE})`
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/mixins/richEditor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('richEditor.js', () => {
'hello foo@bar - hello @@foobar',
'@foobar no space - \n\n@foobar @foobar',
'hello @"guest/47e0a7cf"',
'hello @"email/47e0a7cf"',
'hello @"group/group-id" @"federated_user/user-id"',
'hello @"federated_user/[email protected]:8080"',
]
Expand All @@ -83,6 +84,7 @@ describe('richEditor.js', () => {
'hello foo@bar - hello @@foobar',
'@foobar no space - <br><br>@foobar @foobar',
'hello @"guest/47e0a7cf"',
'hello @"email/47e0a7cf"',
'hello @"group/group-id" @"federated_user/user-id"',
'hello @"federated_user/[email protected]:8080"',
]
Expand Down
Loading