fix(type ahead): fixed highlight, and made the highlight more distinct, also rolled back #2436 due to its issues on linux and windows, fixes #2527

This commit is contained in:
Torkel Ödegaard
2015-08-18 10:09:02 +02:00
parent 4f7587492d
commit bf5081ec8c
3 changed files with 9 additions and 2 deletions

View File

@@ -386,3 +386,7 @@
padding: 80px 0;
}
}
.typeahead strong {
color: @yellow;
}

View File

@@ -23,7 +23,7 @@ p {
// Ex: 14px base font * 85% = about 12px
small { font-size: 85%; }
strong { font-weight: 500; }
strong { font-weight: bold; }
em { font-style: italic; color: @headingsColor; }
cite { font-style: normal; }

View File

@@ -1993,9 +1993,12 @@
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
if (!query) {
return item;
}
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
});
}
, render: function (items) {