mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 17:41:03 +01:00
do not treat empty line as a rule
This commit is contained in:
parent
180285fc5f
commit
4b3e90de8c
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,9 @@ var renderRules = function(details) {
|
||||||
i = rules.length;
|
i = rules.length;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
rule = rules[i].trim();
|
rule = rules[i].trim();
|
||||||
|
if ( rule === '' ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
sessionRules[rule] = allRules[rule] = true;
|
sessionRules[rule] = allRules[rule] = true;
|
||||||
}
|
}
|
||||||
details.sessionRules = rules.sort().join('\n');
|
details.sessionRules = rules.sort().join('\n');
|
||||||
|
@ -79,6 +82,9 @@ var renderRules = function(details) {
|
||||||
i = rules.length;
|
i = rules.length;
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
rule = rules[i].trim();
|
rule = rules[i].trim();
|
||||||
|
if ( rule === '' ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
permanentRules[rule] = allRules[rule] = true;
|
permanentRules[rule] = allRules[rule] = true;
|
||||||
}
|
}
|
||||||
details.permanentRules = rules.sort().join('\n');
|
details.permanentRules = rules.sort().join('\n');
|
||||||
|
|
Loading…
Reference in a new issue