From 5f7344874b912d3f2800add6eee066bdf59f8320 Mon Sep 17 00:00:00 2001 From: Timothy Stack Date: Tue, 7 Apr 2015 17:24:56 -0700 Subject: [PATCH] [pretty] only start a new line after a comma if we're in a structure --- src/pretty_printer.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pretty_printer.hh b/src/pretty_printer.hh index c5abfb65..18a39bfb 100644 --- a/src/pretty_printer.hh +++ b/src/pretty_printer.hh @@ -101,10 +101,13 @@ public: this->write_element(el); continue; case DT_COMMA: - this->flush_values(true); - this->write_element(el); - this->start_new_line(); - continue; + if (this->pp_depth > 0) { + this->flush_values(true); + this->write_element(el); + this->start_new_line(); + continue; + } + break; default: break; }