diff --git a/src/server/injected/textSelectorEngine.ts b/src/server/injected/textSelectorEngine.ts index 5f4c85c480..aa2a3243a1 100644 --- a/src/server/injected/textSelectorEngine.ts +++ b/src/server/injected/textSelectorEngine.ts @@ -76,8 +76,8 @@ function createMatcher(selector: string): Matcher { const re = new RegExp(selector.substring(1, lastSlash), selector.substring(lastSlash + 1)); return text => re.test(text); } - selector = selector.trim().toLowerCase(); - return text => text.toLowerCase().includes(selector); + selector = selector.trim().toLowerCase().replace(/\s+/g, ' '); + return text => text.toLowerCase().replace(/\s+/g, ' ').includes(selector); } // Skips
,