mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-06 19:02:30 +01:00
Fix incorrect serialization of pseudo elements
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/ylnvwf/how_to_block_suggestive_keyword_in_reddit_search/iv014wu/
This commit is contained in:
parent
d7cca916a6
commit
c3d0d574d7
@ -1636,7 +1636,8 @@ Parser.prototype.SelectorCompiler = class {
|
||||
}
|
||||
case 'PseudoClassSelector':
|
||||
case 'PseudoElementSelector':
|
||||
out.push(`:${data.name}`);
|
||||
out.push(data.type === 'PseudoClassSelector' ? ':' : '::');
|
||||
out.push(data.name);
|
||||
if ( Array.isArray(part.args) ) {
|
||||
const arg = this.astSerialize(part.args);
|
||||
if ( typeof arg !== 'string' ) { return; }
|
||||
@ -1656,7 +1657,6 @@ Parser.prototype.SelectorCompiler = class {
|
||||
return out.join('');
|
||||
}
|
||||
|
||||
|
||||
astSerialize(parts, plainCSS = true) {
|
||||
const out = [];
|
||||
for ( const part of parts ) {
|
||||
|
Loading…
Reference in New Issue
Block a user