mirror of https://github.com/gorhill/uBlock.git
do not treat empty line as a rule
This commit is contained in:
parent
180285fc5f
commit
4b3e90de8c
|
@ -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 New Issue