fix optimization option wrongly scoped

nohash
cloudhead 15 years ago
parent 6086e903a8
commit 30bf1ff7f3

@ -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 {

Loading…
Cancel
Save