-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
fix: user highlights matching just part of words #33776
base: develop
Are you sure you want to change the base?
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 980fbfb The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #33776 +/- ##
========================================
Coverage 75.55% 75.56%
========================================
Files 492 493 +1
Lines 21558 21566 +8
Branches 5373 5374 +1
========================================
+ Hits 16288 16296 +8
Misses 4630 4630
Partials 640 640
Flags with carried forward coverage won't be shown. Click here to find out more. |
15e56df
to
4152880
Compare
} | ||
|
||
return highlights.some((highlight: string) => { | ||
const regexp = new RegExp(`\\b${escapeRegExp(highlight)}\\b`, 'i'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will still make us highlight emojis (:highlight:
), won't it? 🤔 I wonder if we should take the chance to fix this too (wdyt, do you consider them words too? I've already seem some complaints about this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmm.. good point.. let me create a few unit tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to not match emojis.. not the prettiest regex but that's the one I could come up with
Proposed changes (including videos or screenshots)
created some unit tests to illustrate what was the issue with the previous code
Issue(s)
Steps to test or reproduce
Further comments