-
Notifications
You must be signed in to change notification settings - Fork 8
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
When a space is added additionaly to the searchterm every space is marked #7
Labels
Comments
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" ***@***.***> 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
<#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 ***@***.***> 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
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADeY4SI92SkMIq4ThRhJdi6WxurhWlyNks5tI4HHgaJpZM4RX9jO>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: