We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 90405d3 + 00bcf03 commit 6fdc91aCopy full SHA for 6fdc91a
src/slim-select/render.ts
@@ -1285,7 +1285,7 @@ export default class Render {
1285
private highlightText(str: string, search: any, className: string) {
1286
// the completed string will be itself if already set, otherwise, the string that was passed in
1287
let completedString: any = str
1288
- const regex = new RegExp('(' + search.trim() + ')(?![^<]*>[^<>]*</)', 'i')
+ const regex = new RegExp('(?![^<]*>)(' + search.trim() + ')(?![^<]*>[^<>]*</)', 'i')
1289
1290
// If the regex doesn't match the string just exit
1291
if (!str.match(regex)) {
0 commit comments