Closed r-zander closed 9 years ago
Hmm, that is weird, your examples work for me (similar file compiles on travis too). Could you please put breakpoint on the line
LessCompiler.CompilationResult result = compiler.compile(lessSource, configuration);
and check output of lessSource.getContent();
at that point? Maybe something modified file you are compiling before it hit less4j.
I checked the content - it's the same as in my file.
But I think I found the cause: My cases behave like this if you have a BOM in the beginning of your file (as I usually have). Without BOM (but still in UTF-8 encoding) everything works fine. Is this a supposed behavior? I always thought that UTF-8 files should start with the BOM.
No one likes BOM. We use https://github.com/apache/wicket/blob/master/wicket-util/src/main/java/org/apache/wicket/util/io/BOMInputStream.java in Wicket to remove the BOM before reading the markup files.
I would rather not to deal with BOM, so I will close this as "wont fix". If anyone disagree, feel free to make your case either here or in a new issue and I will reconsider my position.
Hi there,
just started with Less4j today (via Wicket-Bootstrap-Less), so chances are good that my issue isn't really one - but at least Less.js behaved different than less4j and I wasn't able to find this behavior documented.
Wicket bootstrap less uses less4j like this:
1st case: Stylesheet beginning with charset:
Leads to
How am I supposed to provide a charset for the stylesheet?
2nd case: Stylesheet starting with a variable:
Leads to the same error message(s).
3rd case: Variable declaration after some rule:
Finally works!
As I am new to less4j, the error message was not really helpful but after some tinkering I found out what's going on.