1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Rearrange code flow

This commit is contained in:
Raymond Hill 2022-11-04 11:08:41 -04:00
parent 123cb0b0f4
commit 36bfa27c30
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1634,10 +1634,11 @@ Parser.prototype.SelectorCompiler = class {
}
break;
}
case 'PseudoClassSelector':
case 'PseudoElementSelector':
out.push(data.type === 'PseudoClassSelector' ? ':' : '::');
out.push(data.name);
out.push(':');
/* fall through */
case 'PseudoClassSelector':
out.push(`:${data.name}`);
if ( Array.isArray(part.args) ) {
const arg = this.astSerialize(part.args);
if ( typeof arg !== 'string' ) { return; }