fixed scope problem in parser

This commit is contained in:
cloudhead 2010-03-18 14:49:10 -04:00
parent 098474d9e6
commit 79a3b58fa8

View File

@ -658,16 +658,16 @@ less.parser = {
},
rule: function () {
if (name = $(this.property) || $(this.variable)) {
value = (function () {
value = (function (that) {
if ((name[0] != '@') && (match = peek(/([^@+\/*(;{}-]*);/g))) {
i += match[0].length - 1;
return match[1];
} else if (name === "font") {
return $(this.font);
return $(that.font);
} else {
return $(this.value);
return $(that.value);
}
})();
})(this);
if ($(this.end)) {
return new(tree.Rule)(name, value);