mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fix client auto-complete search highlighting
This commit is contained in:
parent
b87afa8dc4
commit
48ec94ce39
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -450,10 +450,10 @@ if (window.ko) {
|
||||
function comboboxHighlighter(item) {
|
||||
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
|
||||
var result = item.replace(new RegExp('<br/>', 'g'), "\n");
|
||||
result = stripHtmlTags(result);
|
||||
result = result.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
||||
return match ? '<strong>' + match + '</strong>' : query;
|
||||
});
|
||||
result = stripHtmlTags(result);
|
||||
return result.replace(new RegExp("\n", 'g'), '<br/>');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user