SomMeri / less4j

Less language is an extension of css and less4j compiles it into regular css. Less adds several dynamic features into css: variables, expressions, nested rules, and so on. Less was designed to be compatible with css and any correct css file is also correct less file.
145 stars 47 forks source link

Malformed less causes infinite loop #329

Closed EXPEphall closed 8 years ago

EXPEphall commented 8 years ago

Attempting to import this malformed less causes less4j to go into an infinite loop (at least I assume it is infinite, it will happily run for at least half an hour):

a&.b {
  &:c {
  }
}

less.js compiles it quickly and produces no output. Deleting the first ampersand makes both less4j and less.js compile it quickly to no output.

Discovered while switching a large codebase from lesscss-java to less4j

SomMeri commented 8 years ago

@EXPEphall It is fixed. If you need release fast, please let me know and I will do it. Otherwise I will release in two weeks or so after https://github.com/SomMeri/less4j/pull/330#issuecomment-182754541.

EXPEphall commented 8 years ago

Thanks for fixing this. I'm happy to wait until #330 before a release.