mishoo/UglifyJS — Issue #311: Add blocks when beautify : true
Author: piuccio
Created: 2012-01-31 20:24:28+00:00
State: open

It's more a feature request.

Would it be possible to add blocks around if, for, while, ... when beautify is set to true? Or maybe add another option for that

console.log(uglify.gen_code(parser.parse("if (true) a = 1;"), {beautify: true}));
This returns
if (true) a = 1;

I'd expect
if (true) {
a = 1;
}