Pregunta

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).

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top