You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
I use the LessSource.getImports method to build up a dependency tree of Less files. Now I switched from Less 1.3.3
@import mixins.less
to Less 1.7
@import (reference) mixins.less
Sadly after this change those imports are not being recognized as Imports anymore.
This is due to the Regex Pattern defined in LessSource.java#45
/** * The <code>Pattern</code> used to match imported files. */privatestaticfinalPatternIMPORT_PATTERN = Pattern.compile("^(?!\\s*//\\s*).*(@import\\s+(url\\(|\\((less|css)\\))?\\s*(\"|')(.+)\\s*(\"|')(\\))?(.*);).*$", MULTILINE);
There are to possibilities to solve this.
Add the missing import directives (reference, inline, once)
Add another function, that returns all "non standard" Imports (which would be: reference, inline, multiple). Anyway "once" would be still missing in the regular .getImports.
Personally, I would go for option 1, as it is - what I believe - is expected behaviour. An import is an import and should therefore be returned. Anyway you should then account for the "multiple" directive and only return the file once in the Map.
Brgds
Jan
The text was updated successfully, but these errors were encountered:
Hi,
I use the LessSource.getImports method to build up a dependency tree of Less files. Now I switched from Less 1.3.3
@import mixins.less
to Less 1.7
Sadly after this change those imports are not being recognized as Imports anymore.
This is due to the Regex Pattern defined in LessSource.java#45
There are to possibilities to solve this.
Personally, I would go for option 1, as it is - what I believe - is expected behaviour. An import is an import and should therefore be returned. Anyway you should then account for the "multiple" directive and only return the file once in the Map.
Brgds
Jan
The text was updated successfully, but these errors were encountered: