mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
@@ -349,21 +349,25 @@ Ruleset.prototype.parseValue = function(toParse) {
|
||||
var self = this;
|
||||
function transformDeclaration(decl) {
|
||||
if (decl.value instanceof Anonymous && !decl.parsed) {
|
||||
this.parse.parseNode(
|
||||
decl.value.value,
|
||||
["value", "important"],
|
||||
decl.value.getIndex(),
|
||||
decl.fileInfo(),
|
||||
function(err, result) {
|
||||
if (err) {
|
||||
decl.parsed = true;
|
||||
}
|
||||
if (result) {
|
||||
decl.value = result[0];
|
||||
decl.important = result[1] || '';
|
||||
decl.parsed = true;
|
||||
}
|
||||
});
|
||||
if (typeof decl.value.value === "string") {
|
||||
this.parse.parseNode(
|
||||
decl.value.value,
|
||||
["value", "important"],
|
||||
decl.value.getIndex(),
|
||||
decl.fileInfo(),
|
||||
function(err, result) {
|
||||
if (err) {
|
||||
decl.parsed = true;
|
||||
}
|
||||
if (result) {
|
||||
decl.value = result[0];
|
||||
decl.important = result[1] || '';
|
||||
decl.parsed = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
decl.parsed = true;
|
||||
}
|
||||
|
||||
return decl;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
|
||||
// test late parsing
|
||||
@cols: 1, 2;
|
||||
|
||||
.a(@i: length(@cols)) when (@i > 0) {
|
||||
@divider: e(extract(@cols, @i));
|
||||
}
|
||||
.a;
|
||||
|
||||
.b(@j: 1) when (@j < length(@cols)) {
|
||||
@divider: e(extract(@cols, @j));
|
||||
}
|
||||
.b;
|
||||
|
||||
// simple array/list:
|
||||
|
||||
.multiunit {
|
||||
|
||||
Reference in New Issue
Block a user