New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mentionPattern does not match names that end in -
#2202
Comments
The fix is not complete as it doesn’t handle when the username is at the end of the line. It also doesn’t handle the case when the username starts with a dash. |
One should have limited usernames to be alphanumeric only |
Yes I am not sure how much more extendable this is without introducing a bunch of false positive mentions |
I think you can reproduce the behavior of Something like I also firmly disagree that this is “untestable”. There should be at least a few tests that check stuff like:
|
The actual code this is in |
Btw using |
@Askaholic this pattern matches on just spaces as did @1-alex98. So this is not trivial it seems |
I think I was able to fix it |
People who's names end in
-
can't be pinged.After messing around a bit, I think this is due to the
\b
word boundary matching. As-
is not a word character, a space can never match after it (word boundary requires word before and non-word after, or vice versa). You can still ping these people if you put a letter directly after the-
in order to trigger the word boundary matching.Wanna have the bug fixed quickly?
Visit Issue hunt...
The text was updated successfully, but these errors were encountered: