Fix client auto-complete search highlighting
This commit is contained in:
parent
b87afa8dc4
commit
48ec94ce39
3 changed files with 3 additions and 3 deletions
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…
Add table
Reference in a new issue