select2 exports the function it uses to do the underlining here:
window.Select2.util.markMatch
here is how it is used in the default formatter:
formatResult: function(result, container, query, escapeMarkup) {
var markup=[];
markMatch(result.text, query.term, markup, escapeMarkup);
return markup.join("");
},
you can do the same but you have to reference it via the export above.
-igor
> --
> You received this message because you are subscribed to the Google Groups "select2" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
select2+u...@googlegroups.com.
> To post to this group, send email to
sel...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/select2?hl=en.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>