mathiasbynens / luamin

A Lua minifier written in JavaScript
https://mths.be/luamin
MIT License
217 stars 54 forks source link

Aggressive parentheses removal breaks sources. #42

Closed kaeza closed 7 years ago

kaeza commented 8 years ago

I tend to use the style ("some string"):method(...) (e.g. print(("x=%d"):format(x))), which is valid Lua but requires the parentheses around the literal string.

Now it seems luamin is minifying the code to print("x=%d":format(x)), which causes a syntax error.

Using luamin 1.0.3 from NPM.

Related to #39.