Fix parsing of whitespace in calls.
This brings over cloudmade/less.js@333d1def4 to permit whitespace in front of arguments of function calls, and tweaks the related test to make sure it stays that way. This fixes #154
This commit is contained in:
parent
033a5cd5a5
commit
912988e174
@ -461,16 +461,18 @@ carto.Parser = function Parser(env) {
|
||||
call: function() {
|
||||
var name, args;
|
||||
|
||||
if (! (name = /^([\w\-]+|%)\(/.exec(chunks[j]))) return;
|
||||
if (!(name = /^([\w\-]+|%)\(/.exec(chunks[j]))) return;
|
||||
|
||||
name = name[1];
|
||||
|
||||
if (name === 'url') {
|
||||
return null;
|
||||
} else {
|
||||
i += name.length + 1;
|
||||
i += name.length;
|
||||
}
|
||||
|
||||
$('('); // Parse the '(' and consume whitespace.
|
||||
|
||||
args = $(this.entities.arguments);
|
||||
|
||||
if (!$(')')) return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
@trans: 2;
|
||||
#world {
|
||||
point-file: url(foo.png);
|
||||
point-transform: translate(@trans * 2, @trans);
|
||||
point-transform: translate( @trans * 2, @trans);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user