Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

[MM 14801] Don't highlight [at]channel/all/here in usernames #2608

Merged
merged 2 commits into from
Apr 4, 2019

Conversation

deanwhillier
Copy link
Contributor

Summary

PR 2338 made [at]all/channel/here mentions more flexible to allow for trailing punctuation. The fix was a bit too flexible, for example incorrectly highlighting [at]all in usernames like [at]allen, so this PR changes the highlight behaviour to require that [at]all/channel/here mentions be distinct words preventing them from highlighting when at the beginning of a larger word like a username.

Note: Since an underscore is not considered to be punctuation by regular expressions, if it is included immediately following an [at]channel/all/here mention, the mention won't highlight. This can't be easily fixed and would require more mana to attempt.

Ticket Link

MM-14801

make sure (at)channel/all/here only highlight if they are distinct words
@deanwhillier deanwhillier added 2: Dev Review Requires review by a core commiter CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Apr 3, 2019
@deanwhillier deanwhillier added this to the v5.10.0 milestone Apr 3, 2019
@deanwhillier deanwhillier requested review from migbot and hmhealey April 3, 2019 19:21
@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Apr 4, 2019
@deanwhillier deanwhillier merged commit 16b3519 into master Apr 4, 2019
deanwhillier added a commit that referenced this pull request Apr 4, 2019
* fix `all` highlighting in usernames

make sure (at)channel/all/here only highlight if they are distinct words

* remove tests that don’t work anymore
@deanwhillier deanwhillier added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed 4: Reviews Complete All reviewers have approved the pull request CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Apr 4, 2019
@deanwhillier deanwhillier deleted the MM-14801 branch April 4, 2019 14:35
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Changelog/Done Required changelog entry has been written and removed Changelog/Not Needed Does not require a changelog entry Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation labels Apr 4, 2019
@lindy65 lindy65 added the Tests/Not Needed Does not require new release tests label Apr 8, 2019
deanwhillier added a commit that referenced this pull request Apr 11, 2019
* fix `all` highlighting in usernames

make sure (at)channel/all/here only highlight if they are distinct words

* remove tests that don’t work anymore
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog/Done Required changelog entry has been written CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation Tests/Not Needed Does not require new release tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants