If there exists a user with username "foo" and some markdown content has firstname.lastname@example.org then we'll incorrectly get a username link of @foo in the middle of that email address.
There's also weird regex matching behavior when typing in the editor. @foo. will trigger the autocomplete again when you type the . It also happens with other punctuation like @foo=. And can happen at the beginning like @//.?
I made branch ss/8299 and improved regex by adding \B. So it will not catch things like email@example.com and johndoe@foo.
In the test, since @nouser1 isn't a user the new assertion isn't a very strong one. Better to test with firstname.lastname@example.org I think. Besides that I think this will be good to merge to handle the server-side parsing.
Note my comment above about the behavior when typing in the editor too. That is really a separate issue but similar. Not too critical, so can be dealt with later if you wish.
Hi.. acutually I missed to replace nouser with correct one. Now I updated the branch. Yeah we can keep this ticket open until I fix the editor typing improvement.
I have updated autocomplete regex in ss/8299
Nice, works better now :)
Log in to post a comment.