-
Notifications
You must be signed in to change notification settings - Fork 839
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
[EuiHighlight] Highlight separated words #5798
Comments
It occurred to me after filing this that it may be helpful to simply support the |
Yeah that makes sense to me |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Still relevant. |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
Still relevant. |
As a workaround to achieve the desired behaviour, users can achieve multiple differing highlights without modification of eui/src/components/highlight/highlight.tsx Line 128 in 0b320cd
...so you can actually directly pass it any regex you like - ie you can pass it a regex alternation for all the terms you care about (eg To construct the regex, just place a pipe symbol ( Ideally Screen.Recording.2023-06-16.at.15.42.29.mov |
Was excited about this workaround until you pointed out the page-crash bug... |
👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed. |
Still useful. |
When using tools like App Search to highlight, it will highlight across words as most searches will do. For instance, searching for
would highlight the title as shown:
However,
EuiHighlight
only works on case insensitive matches of the entire phrase. Using theEuiHighlight
example text:fox dog
fails to highlight anything:fox jumped
worksfox
works (as doesfox
with a space before/after, with the space unexpectedly highlighted)dog
worksThe text was updated successfully, but these errors were encountered: