rspivak / slimit

SlimIt - a JavaScript minifier/parser in Python
MIT License
551 stars 94 forks source link

Problem with "+", "++" and whitespace #26

Closed davidkhess closed 12 years ago

davidkhess commented 12 years ago

Needed whitespace is being lost in this example.

>>> minify('''"begin"+ ++a+"end"''')
'"begin"+++a+"end";'
>>> 

The result is interpreted as a ++ postfix operator on "begin".

rspivak commented 12 years ago

Fixed in https://github.com/rspivak/slimit/commit/600861b7bc3fa426e3c6c79bd1d7cdcdfb8054a9

davidkhess commented 12 years ago

Thanks!