#8299 More precise markdown @username regex

v1.11.1
closed
gsoc19 (11)
General
2019-07-15
2019-06-06
No

If there exists a user with username "foo" and some markdown content has johndoe@foo.com then we'll incorrectly get a username link of @foo in the middle of that email address.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2019-06-10

    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 @//.?

     
  • Hi.. @brondsem

    I made branch ss/8299 and improved regex by adding \B. So it will not catch things like johndoe@foo.com and johndoe@foo.

     
  • Dave Brondsema

    Dave Brondsema - 2019-06-25

    In the test, since @nouser1 isn't a user the new assertion isn't a very strong one. Better to test with test@admin1.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.

     
    👍
    1
  • 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.

    Thanks

     
  • Dave Brondsema

    Dave Brondsema - 2019-06-26

    Merged ss/8299

     
    👍
    1
    • status: open --> in-progress
     
  • Hi..

    I have updated autocomplete regex in ss/8299

    Thanks

     
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2019-07-02
    • status: review --> closed
    • assigned_to: Shalitha Suranga
    • Reviewer: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2019-07-02

    Nice, works better now :)

     
    🎉
    1
  • Dave Brondsema

    Dave Brondsema - 2019-07-15
    • Milestone: unreleased --> v1.11.1
     

Log in to post a comment.