mirror of
https://github.com/less/less.js.git
synced 2026-02-08 22:15:04 -05:00
trim whitespace
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user