fix capitalized suggestions

This commit is contained in:
Cade Scroggins
2021-01-08 16:22:55 +05:30
parent 75371b79f9
commit 4d2ca856d2
+4 -4
View File
@@ -1001,11 +1001,11 @@
.slice(0, this._limit) .slice(0, this._limit)
.reduce((acc, suggestion) => { .reduce((acc, suggestion) => {
const match = new RegExp($.escapeRegex(this._currentInput), 'ig'); const match = new RegExp($.escapeRegex(this._currentInput), 'ig');
const matched = suggestion.match(match);
const suggestionHtml = suggestion.replace( const suggestionHtml = matched
match, ? suggestion.replace(match, `<b>${matched[0]}</b>`)
`<b>${this._currentInput}</b>` : suggestion;
);
return ` return `
${acc} ${acc}