Commit bf5081ec by Torkel Ödegaard

fix(type ahead): fixed highlight, and made the highlight more distinct, also…

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
parent 4f758749
......@@ -386,3 +386,7 @@
padding: 80px 0;
}
}
.typeahead strong {
color: @yellow;
}
......@@ -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; }
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment