1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-06 19:02:30 +01:00

Mind implicit prelude * element in pseudo operators

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2355
This commit is contained in:
Raymond Hill 2022-11-10 08:47:54 -05:00
parent b7b53eef14
commit 4d4a5f3807
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1728,12 +1728,14 @@ Parser.prototype.SelectorCompiler = class {
break;
case 'ProceduralSelector':
if ( prelude.length !== 0 ) {
if ( tasks.length === 0 ) {
out.selector = prelude.join('');
} else {
tasks.push(this.createSpathTask(prelude.join('')));
}
let spath = prelude.join('');
prelude.length = 0;
if ( spath.endsWith(' ') ) { spath += '*'; }
if ( tasks.length === 0 ) {
out.selector = spath;
} else {
tasks.push(this.createSpathTask(spath));
}
}
const args = this.compileArgumentAst(data.name, part.args);
if ( args === undefined ) { return; }