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

View file

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