Open tobika opened 6 years ago
The issue is i have implemented a word by word search where space seperates 2 words so each of them will be marked indevidually ..
I can take care of the edge case were there is only a word followed by spave without a dollowing word ..
Bu again this will not give you what you want ..
Each of the word will be marked indipendantlly event if its a single occorence ..
On Jan 9, 2018 5:04 PM, "Tobias Kausch" notifications@github.com wrote:
Example on your demo: https://arthurvaverko.github.io/ngx-highlight/
When you search for example "some " with a space behind all spaces are marked. To see this you can just use: document.querySelectorAll('mark') in the webconsole.
Probably something with the regex? Unfortunately they are dark magic for me ;)
Use case for me: I want to highlight 2 or more words that are connected with a space in one string.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arthurvaverko/ngx-highlight/issues/7, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeY4YVE_GpTKd980muVNpD1tzCZ8lUtks5tI4AKgaJpZM4RX9jO .
Thanks for you fast response. The fact that they are selected independently could be ok for me. The question is if it's wanted that once you add a space to the search term all spaces are marked, this might be unwanted for most people?
I guess I will forbid my users to write a space in the search bar.
the case of word ending with a space can be handled ... and should be.. i see no point hilighting all spaces in a document..
it will take me some time to get to it at the mean time any one who would like to pick it up is more than welcome..
On Tue, Jan 9, 2018 at 5:12 PM, Tobias Kausch notifications@github.com wrote:
Thanks for you fast response. The fact that they are selected independently could be ok for me. The question is if it's wanted that once you add a space to the search term all spaces are marked, this might be unwanted for most people?
I guess I will forbid my users to write a space in the search bar.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/arthurvaverko/ngx-highlight/issues/7#issuecomment-356311895, or mute the thread https://github.com/notifications/unsubscribe-auth/ADeY4SI92SkMIq4ThRhJdi6WxurhWlyNks5tI4HHgaJpZM4RX9jO .
Example on your demo: https://arthurvaverko.github.io/ngx-highlight/
When you search for example "some " with a space behind all spaces are marked. To see this you can just use:
document.querySelectorAll('mark')
in the webconsole.Probably something with the regex? Unfortunately they are dark magic for me ;)
Use case for me: I want to highlight 2 or more words that are connected with a space in one string.
PS : thanks a lot for this otherwise great directive