alexo / wro4j

New project location is:https://github.com/wro4j/wro4j
442 stars 110 forks source link

CssImportPreProcessor mishandle //** comments #187

Closed SomMeri closed 9 years ago

SomMeri commented 10 years ago

If the input less file contains //** blah style comment, the removeImportsFromComments method of CssImportInspector removes everything between it and closest */.

Simple example less:

//** deleting the comment removes the problem
@body-bg:               #fff;

/**
 * deleting the comment removes the problem
 */
@import  "variables.less";
@mainColor: blue;

h1,h2,h3,h4,h5,h6,h7,h8 {
    color: @mainColor;
    font-weight: normal;
}

is transformed into syntactically incorrect:

/
@import  "variables.less";
@mainColor: blue;

h1,h2,h3,h4,h5,h6,h7,h8 {
    color: @mainColor;
    font-weight: normal;
}

Context: attempts to import variables.less file from bootstrap and compile the result using wro4j leads to compile error in less4j https://github.com/SomMeri/less4j/issues/208 .

alexo commented 10 years ago

@SomMeri thanks for reporting the issue.

M3lkior commented 10 years ago

Waiting for correction :) Thanks in advance.

M3lkior commented 10 years ago

Available in next release ? :)

alexo commented 10 years ago

Chances to include it for next release greatly increase if there is somebody willing to contribute ;)

M3lkior commented 9 years ago

I tried to modify your code @alexo but the project is voluminous and i'm affraid to do regression with pull request :/

mrcage commented 9 years ago

Any update on this issue? Currently, compiling the current Bootstrap v3.3.5 fails with wro4j due to this...

alexo commented 9 years ago

@mrcage this issue was migrated to the new project home page: https://github.com/wro4j/wro4j/issues/976 I will try to fix, but it would help a lot if there is anyone willing to help.

mrcage commented 9 years ago

Thanks. I do not know the wro4j code, but I could help in testing the bugfix in the next release candidate.

alexo commented 9 years ago

This issue is fixed and will be released in next version. The fix can be found at the new location of the project: https://github.com/wro4j/wro4j/issues/976

mrcage commented 9 years ago

Thanks a lot for fixing this.