trim whitespace

This commit is contained in:
cloudhead
2010-02-23 23:21:17 -05:00
parent 308d32c587
commit 0dc6c2e4c4

View File

@@ -211,10 +211,10 @@ less.parser = {
},
dimension: function dimension() {
var number, unit;
number = $(/-?[0-9]*\.?[0-9]+/g);
unit = $(/(?:px|%|em|pc|ex|in|deg|s|pt|cm|mm)/g);
if (number) { return new(node.Dimension)(number, unit) }
}
},
@@ -241,7 +241,7 @@ less.parser = {
value = null;
if ($(':')) {
if (value = $(this.expression)) {
params.push([param, value]);
params.push([param, value]);
} else {
throw new(Error)("Expected value");
}
@@ -262,7 +262,7 @@ less.parser = {
},
entity: function entity() {
var entities = [
"url", "variable", "call", "accessor",
"url", "variable", "call", "accessor",
"keyword", "literal", "font"
], e;
@@ -308,7 +308,7 @@ less.parser = {
attr = val;
}
if (! $(']')) return;
if (attr) { return ['ATTR', '[' + attr + ']'] }
},
block: function block(node) {
@@ -412,7 +412,7 @@ less.parser = {
if (o = $(this.sub) || $(this.entities.dimension) ||
$(this.entities.color) || $(this.entities.variable) ||
($('-') && $(this.operand))) {
return o;
return o;
}
},
expression: function expression() {