Allow tab completing users in brackets (#28460)

* Allow tab completing users in brackets

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Account for range offsets when tab completing to not replace unrelated characters

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-11-15 09:11:03 +00:00 committed by GitHub
parent d36cfc37e2
commit ae3ca52bd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 5 deletions

View file

@ -37,7 +37,7 @@ const USER_REGEX = /\B@\S*/g;
// used when you hit 'tab' - we allow some separator chars at the beginning
// to allow you to tab-complete /mat into /(matthew)
const FORCED_USER_REGEX = /[^/,:; \t\n]\S*/g;
const FORCED_USER_REGEX = /[^/,.():; \t\n]\S*/g;
export default class UserProvider extends AutocompleteProvider {
public matcher: QueryMatcher<RoomMember>;