mirror of
https://github.com/less/less.js.git
synced 2026-01-22 13:48:03 -05:00
fix optimization option wrongly scoped
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user