1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Fix removal of :scope prefix in :has() operator

Related feedback:
https://github.com/uBlockOrigin/uBlock-issues/issues/2778#issuecomment-1705101771
This commit is contained in:
Raymond Hill 2023-09-11 12:34:53 -04:00
parent d5fb3c08a1
commit 2571660161
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3687,7 +3687,7 @@ class ExtSelectorCompiler {
case 'has': {
let r = this.astCompile(parts, { noaction: true });
if ( typeof r === 'string' ) {
r = { selector: r.replace(/^\s*:scope\s*/, ' ') };
r = { selector: r.replace(/^\s*:scope\s*/, '') };
}
return r;
}