mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-23 02:42:41 +01:00
Code review re. attribute serializer
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2300
Related commit:
- 7379bafb23
This commit is contained in:
parent
7379bafb23
commit
fe4cfeba2e
@ -1579,12 +1579,12 @@ Parser.prototype.SelectorCompiler = class {
|
||||
switch ( data.type ) {
|
||||
case 'AttributeSelector': {
|
||||
const name = data.name.name;
|
||||
if ( data.matcher === null ) {
|
||||
out.push(`[${name}]`);
|
||||
break;
|
||||
}
|
||||
const value = data.value.value || data.value.name;
|
||||
out.push(
|
||||
data.matcher
|
||||
? `[${name}${data.matcher}"${value}"]`
|
||||
: `[${name}]`
|
||||
);
|
||||
out.push(`[${name}${data.matcher}"${value}"]`);
|
||||
break;
|
||||
}
|
||||
case 'ClassSelector':
|
||||
|
Loading…
Reference in New Issue
Block a user