rgrove / jsmin-php

:skull: PHP port of Douglas Crockford's JSMin JavaScript minifier. No longer maintained.
423 stars 128 forks source link

1+ ++i jsminified incorrectly #2

Closed scramatte closed 13 years ago

scramatte commented 14 years ago

this line is not jsminified properly

a = 1 + ++i

jsmin-php delete the space between the first + and ++ resulting javascript interpretation error.

In Llamlab XPath (http://www.llamalab.com/js/xpath/) library the author use 2 or 3 times this syntax ...

I bypass the problem put ++i between parenthesis

nevstokes commented 14 years ago

This problem is documented by Douglas Crockford on JSMin page so I'm unsure if this is actually a valid issue:

http://www.crockford.com/javascript/jsmin.html