oyejorge / less.php

less.js ported to PHP.
http://lessphp.typesettercms.com
Apache License 2.0
657 stars 2 forks source link

SetImportDirs bug #330

Open AlexNodex opened 7 years ago

AlexNodex commented 7 years ago

Hi.

When using SetImportDirs(['path1','path2'..]); does this work with @import statements?

The reason I ask is that I set an override directory for a file called foo.less, there is also a file called foo.less in the same directory as style.less . there is a file called style.less which has the following code

@import 'foo.less;

Does this library look for path1/foo.less then path2/foo.less and return the first one it finds or is it the last one because in my code it's only looking for the last one and not even bothering to look for the other one.

I can prove this with a function on import_callback (as setup in the $options for the constructor) which tells me which files it's looking for but the path1/foo.less never gets looked for.

Have I completely missed the point of the import_callback or something?

AlexNodex commented 7 years ago

Seems it works fine if I just use parse instead of parseFile