mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Added better compression for rules by removing the last semicolon.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user