fix up generator normaliseOptions

This commit is contained in:
Sebastian McKenzie
2014-11-17 12:39:01 +11:00
parent e1474c2f5f
commit 9d3a3a57f2

View File

@@ -35,21 +35,17 @@ _.each(Buffer.prototype, function (fn, key) {
});
CodeGenerator.normaliseOptions = function (opts) {
opts = opts.format || {};
opts = _.merge({
return _.merge({
parentheses: true,
semicolons: true,
comments: opts.comments,
comments: opts.comments == null || opts.comments,
compact: false,
indent: {
adjustMultilineComment: true,
style: " ",
base: 0
}
}, opts);
return opts;
}, opts.format || {});
};
CodeGenerator.generators = {