Fix case-sensitiveness in :has-text() (regression)

Related feedback:
- https://www.reddit.com/r/uBlockOrigin/comments/zqot4i/is_there_a_way_to_show_only_element_with_specific/j0zl4ck/
This commit is contained in:
Raymond Hill 2022-12-20 14:34:54 -05:00
parent 73c50a4077
commit 3fe6846da7
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ const regexFromString = (s, exact = false) => {
return new RegExp(match[1], match[2] || undefined); return new RegExp(match[1], match[2] || undefined);
} }
const reStr = s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); const reStr = s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return new RegExp(exact ? `^${reStr}$` : reStr, 'i'); return new RegExp(exact ? `^${reStr}$` : reStr);
}; };
// 'P' stands for 'Procedural' // 'P' stands for 'Procedural'