Skip to content

Commit

Permalink
Do not allow space seperated values inside parens. Fixes #952
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeapage committed Feb 2, 2013
1 parent b18239e commit 6cd6fb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/less/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,10 +1368,11 @@ less.Parser = function Parser(env) {
}
},
sub: function () {
var e;
var a, e;

if ($('(')) {
if (e = $(this.expression)) {
if (a = $(this.addition)) {
e = new(tree.Expression)([a]);
expect(')');
e.parens = true;
return e;
Expand Down
4 changes: 2 additions & 2 deletions test/less/parens.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
height-all: ((7 * 7) + (8 * 8));
height-parts: ((7 * 7)) + ((8 * 8));
margin-keep: (4 * (5 + 5) / 2) - (@var * 2);
margin-parts: ((4 * (5 + 5) / 2)) (- (@var * 2));
margin-all: ((4 * (5 + 5) / 2) - (@var * 2));
margin-parts: ((4 * (5 + 5) / 2)) - ((@var * 2));
margin-all: ((4 * (5 + 5) / 2) + (-(@var * 2)));
border-radius-keep: 4px * (1 + 1) / @var + 3px;
border-radius-parts: ((4px * (1 + 1))) / ((@var + 3px));
border-radius-all: (4px * (1 + 1) / @var + 3px);
Expand Down

0 comments on commit 6cd6fb2

Please sign in to comment.