Skip to content

Commit

Permalink
Rearrange code flow
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhill committed Nov 4, 2022
1 parent 123cb0b commit 36bfa27
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/js/static-filtering-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 36bfa27

Please sign in to comment.