Skip to content
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

don't catch mentions within links #257

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

tsmethurst
Copy link
Contributor

This PR updates our mention finder regex very slightly to avoid finding mentions incorrectly within links. Solution was to add a little bit to the beginning of the regex specifying that we want either a line beginning or some kind of whitespace to precede a mention, otherwise skip it.

Also add a test for this.

See the regex in action here: https://regex101.com/r/G1oGR0/1/

PR also removes a bit of the weirdness in the regex which I don't know why I put there in the first place!

Closes #223

@tsmethurst tsmethurst merged commit 28b6ce5 into main Sep 30, 2021
@tsmethurst tsmethurst deleted the mention_finder_regex_update branch September 30, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

links with an '@' of a user in them are parsed as mentions not as links
1 participant