Question

it looks like there is a bunch of dead code (code that is commented out) in the lesscss javascript compiler code. Is there a reason for this? When downloading right from the website the file is 34kb, after removing the dead code it is 5.78kb (left in the copyright comments).

Was it helpful?

Solution

When I throw the LESS JavaScript code at a compressor, rarely any code disappears.

When I view the code in my editor (Kate), the Syntax highlighting marks a large part of the code as comments, starting from:

(i.charAt(0)=="/"?i=a.location.protocol+"//"+a.location.host+i:i=g.slice(0,g.last
                                         ^^ From here on

This error is probably caused by the size of the string (34KB at one line). When I add a linebreak before +"//"...., the syntax highlighting works as intended.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top