Skip to content

Commit

Permalink
fix for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pastakhov committed Mar 2, 2023
1 parent 93fa5da commit ba07aa6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/SemanticDrilldown.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
$.ui.autocomplete.prototype._renderItem = function ( ul, item ) {
var re = new RegExp( '(?![^&;]+;)(?!<[^<>]*)(' + this.term.replace( /([^$()[]{}*.+?|\\])/gi, '\\$1' ) + ')(?![^<>]*>)(?![^&;]+;)', 'gi' );
var loc = item.label.search( re );
var $element = $( '<li></li>' );
var t;
if ( loc >= 0 ) {
t = item.label.slice( 0, Math.max( 0, loc ) ) + '<strong>' + item.label.substr( loc, this.term.length ) + '</strong>' + item.label.slice( loc + this.term.length );
} else {
t = item.label;
}
$element = $( '<li></li>' )
.data( 'item.autocomplete', item )
.append( ' <a>' + t + '</a>' )
.appendTo( ul );
if ( item.disabled ) {
$element.addClass( 'ui-state-disabled' );
}
return $element;
return $element
.data( 'item.autocomplete', item )
.append( ' <a>' + t + '</a>' )
.appendTo( ul );
};

$.widget( 'ui.combobox', {
Expand Down

0 comments on commit ba07aa6

Please sign in to comment.