If there exists a user with username "foo" and some markdown content has email@example.com 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 firstname.lastname@example.org 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 email@example.com 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.