fix capitalized suggestions
This commit is contained in:
+4
-4
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user