LeaVerou / awesomplete

Ultra lightweight, usable, beautiful autocomplete with zero dependencies.
http://leaverou.github.io/awesomplete/
MIT License
6.95k stars 609 forks source link

HTML in list items breaks marking of text while filtering #17232

Open koosvanderkolk opened 3 years ago

koosvanderkolk commented 3 years ago

I would like to give some more explanation on the items in the list. E.g. I have the following list:

var myList = ['AND <span>Logical AND operator</span>", "OR <span>Logical OR operator</span>", "NOT <span>Logical NOT operator</span>", "ONLY <span>Filters properties, usage: ONLY (property_a, property_b, ...)</span>"];

Problem is: the highlighting of the items in the list breaks the

E.g. when the input is 'an':

<mark>AN</mark>D <sp<mark>an</mark>>Logical <mark>AN</mark>D operator</sp<mark>an</mark>>

Is this solvable?