How to Highlight Search Terms in HTML Ignoring Case and Accents Using JavaScript?
I am working on a scenario where I want to highlight words or parts of words that people search for. I have a function called addMarks
that wraps the searched word in the <mark>
tag. Of course, this search needs to be case-insensitive, but more than that, it also needs to ignore accents.