Added better compression for rules by removing the last semicolon.

This commit is contained in:
Spocke
2011-10-19 15:26:58 +02:00
committed by Luke Page
parent 8fdec6ba94
commit c04ad3adc1

View File

@@ -218,6 +218,14 @@ tree.Ruleset.prototype = {
}
}
// Remove last semicolon
if (env.compress && rules.length) {
rule = rules[rules.length - 1];
if (rule.charAt(rule.length - 1) === ';') {
rules[rules.length - 1] = rule.substring(0, rule.length - 1);
}
}
rulesets = rulesets.join('');
// If this is the root node, we don't render