Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ampersand regression error in 1.7.4-snapshot #58

Open
bradmac opened this issue Aug 14, 2014 · 3 comments
Open

Ampersand regression error in 1.7.4-snapshot #58

bradmac opened this issue Aug 14, 2014 · 3 comments

Comments

@bradmac
Copy link

bradmac commented Aug 14, 2014

I got an exception compiling LESS that works fine with 1.5.1. Looks like the ampersand operator support got lost?

com.asual.lesscss.LessException: com.asual.lesscss.LessException: Parse Error: Unrecognised input (line 2, column 1) near
.modulePage {
&.course-pf {
background-color: @body-bg !important;
at com.asual.lesscss.compiler.NashornCompiler.compile(NashornCompiler.java:79)

@asual
Copy link
Owner

asual commented Aug 28, 2014

Can you please try to isolate the exact problematic piece or write a simple failing test case. I just tried reproducing this without success. The & operator seems to work as expected for me.

@bradmac
Copy link
Author

bradmac commented Oct 8, 2014

OK, turns out it wasnt the ampersand. The less contained an erroneous piece of code which compiles fine on 1.5.1 but which causes an error on 1.7.4-SNAPSHOT:

div.references {
@LightGrey;
}

So this isnt a bug in asual, i presume.

@bradmac
Copy link
Author

bradmac commented Oct 8, 2014

But, the erroneous LESS above results in this rather unhelpful error message:
Reason: com.asual.lesscss.LessException: Parse Error: Unrecognised input (line 2, column 1) near
.modulePage {
&.course-pf {
background-color: @body-bg !important;

...where the quoted code above is about 300 lines before from the actual error. The only way to find the error is to progressively remove code until it compiles. And this code is in an import, but the filename property of the exception is null, so there is nothing to connect the exception to the file with the error, or what part of the file.

Any chance of tightening up the error reporting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants