Skip to content

Commit

Permalink
Top-level containers are no longer followed by a comma (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton authored Aug 11, 2022
1 parent 605fa49 commit 20ce94a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/bin/ion/commands/beta/inspect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,9 @@ impl<'a> IonInspector<'a> {
// Print the container's closing delimiter: }, ), or ]
self.text_buffer.clear();
self.text_buffer.push_str(&closing_delimiter_for(ion_type));
if ion_type != IonType::SExpression {
if ion_type != IonType::SExpression && self.reader.depth() > 0 {
self.text_buffer.push_str(",");
}
// FIXME: This should also print a trailing `,` if the parent context is
// a list or struct. See this issue for details:
// https://github.com/amzn/ion-cli/issues/17
output(
self.output,
None,
Expand Down

0 comments on commit 20ce94a

Please sign in to comment.