fix optimization option wrongly scoped

This commit is contained in:
cloudhead
2010-03-29 22:13:36 -04:00
parent be2e675b68
commit 660d2f76ba

View File

@@ -52,6 +52,8 @@ less.Parser = function Parser(env) {
inputLength,
parser;
var that = this;
// This function is called after all files
// have been imported through `@import`.
var finish = function () {};
@@ -187,8 +189,8 @@ less.Parser = function Parser(env) {
// Either delimited by /\n\n/ or
// delmited by '\n}' (see rationale above),
// depending on the level of optimization.
if (this.optimization > 0) {
if (this.optimization > 2) {
if (that.optimization > 0) {
if (that.optimization > 2) {
input = input.replace(/\/\*(?:[^*]|\*+[^\/*])*\*+\//g, '');
chunks = input.split(/^(?=\n)/mg);
} else {