mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 08:52:26 +02:00
Mind implicit prelude *
element in pseudo operators
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2355
This commit is contained in:
parent
b7b53eef14
commit
4d4a5f3807
@ -1728,12 +1728,14 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
break;
|
break;
|
||||||
case 'ProceduralSelector':
|
case 'ProceduralSelector':
|
||||||
if ( prelude.length !== 0 ) {
|
if ( prelude.length !== 0 ) {
|
||||||
if ( tasks.length === 0 ) {
|
let spath = prelude.join('');
|
||||||
out.selector = prelude.join('');
|
|
||||||
} else {
|
|
||||||
tasks.push(this.createSpathTask(prelude.join('')));
|
|
||||||
}
|
|
||||||
prelude.length = 0;
|
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);
|
const args = this.compileArgumentAst(data.name, part.args);
|
||||||
if ( args === undefined ) { return; }
|
if ( args === undefined ) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user