0

So when I compile my .less file can those comments be somehow skipped/removed? Because now it looks ridiculous. All the comments are mashed up at the top of the .css file.

I use Drupal 7, Bootstrap 3.0.0, LESS preprocessor module for D7 and lessphp library.

In the lessc.inc.php I find only one line with setPreserveComments:

public function setPreserveComments($preserve) {
    $this->preserveComments = $preserve;
}

It doesn't match the documentations at http://leafo.net/lessphp/docs/#preserving_comments

user13176
  • 303
  • 1
  • 4
  • 10
  • 2
    I guess you should use `$less->setPreserveComments(false);` before compiling to remove the comments and be sure the preservation of comments is off. – jdepypere Nov 11 '13 at 11:58

1 Answers1

1

Comments should be automatically removed, however, if they're showing up, maybe the compiler is setting setPreserveComments to true, find it and comment it out.

Leite
  • 954
  • 5
  • 15
  • Hi. Can you review the issue. I updated it with more infos. It doesn't let me add code to comments section here. Thanks. – user13176 Nov 11 '13 at 11:50
  • That is the compiler code. Check if that function is being called somewhere and being set to true. If you find it, set it to `false` – Leite Nov 11 '13 at 13:46