fix extraneous spaces in beautify

This commit is contained in:
alexlamsl 2017-06-21 00:01:31 +08:00
parent 6b7a9d33a2
commit 76d7b1f99c
2 changed files with 10 additions and 5 deletions

View File

@ -1280,7 +1280,6 @@ function OutputStream(options) {
name_import.print(output); name_import.print(output);
if (i < self.imported_names.length - 1) { if (i < self.imported_names.length - 1) {
output.print(","); output.print(",");
output.space();
} }
}); });
output.space(); output.space();
@ -1329,8 +1328,6 @@ function OutputStream(options) {
output.space(); output.space();
} }
if (self.exported_names) { if (self.exported_names) {
output.space();
if (self.exported_names.length === 1 && self.exported_names[0].name.name === "*") { if (self.exported_names.length === 1 && self.exported_names[0].name.name === "*") {
self.exported_names[0].print(output); self.exported_names[0].print(output);
} else { } else {
@ -1340,13 +1337,11 @@ function OutputStream(options) {
name_export.print(output); name_export.print(output);
if (i < self.exported_names.length - 1) { if (i < self.exported_names.length - 1) {
output.print(","); output.print(",");
output.space();
} }
}); });
output.space(); output.space();
output.print("}"); output.print("}");
} }
output.space();
} }
else if (self.exported_value) { else if (self.exported_value) {
self.exported_value.print(output); self.exported_value.print(output);

View File

@ -85,3 +85,13 @@ issue_2126: {
export { f as dog }; export { f as dog };
} }
} }
beautify: {
beautify = {
beautify: true,
}
input: {
export { A as B, C as D };
}
expect_exact: "export { A as B, C as D };"
}