Be able to determine how many times a search term has appeared in filter when using acrossElements
Is your feature request related to a problem? Please describe.
Currently if you match a term using acrossElements: true, every mark in every element increments the counters provided in filter. If you want to (for example) only mark the first instance of that term, you don't have a counter for that.
Describe the solution you'd like A separate counter to track how many times a single match has been marked.
Describe a potential solution approach Described above.
Additional context Here is an example of the problem: https://jsfiddle.net/xtdchk1a/1/
If you look at the console, every call to filter increments all counters. Ideally you would have a counter that is 0 when it runs the first two times, and 1 when it runs the second two times.
It's possible this is actually a bug and this counter is meant to exist: https://github.com/julmot/mark.js/issues/468
+1 I opened #468 for similar reasons. It was closed due to inactivity.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.