do not treat empty line as a rule

This commit is contained in:
gorhill 2015-02-11 11:49:08 -05:00
parent 180285fc5f
commit 4b3e90de8c

View file

@ -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');