From 84c119ce3d10c04147f795da51db913dd4fec2dd Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 4 Oct 2024 09:19:19 -0400 Subject: [PATCH] Reduce mandatory newlines between textgroup output --- confluent_client/confluent/textgroup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/confluent_client/confluent/textgroup.py b/confluent_client/confluent/textgroup.py index e2f0dc7f..2297c4e5 100644 --- a/confluent_client/confluent/textgroup.py +++ b/confluent_client/confluent/textgroup.py @@ -171,7 +171,9 @@ class GroupedData(object): self.byoutput[outdata]))) currout += '\n====================================\n' currout += outdata - currout += '\n\n' + if currout[-1] != '\n': + currout += '\n' + currout += '\n' output.write(currout) output.flush() @@ -211,7 +213,9 @@ class GroupedData(object): else: currout += '\n'.join(colordiff(modaloutput.split('\n'), outdata.split('\n'))) - currout += '\n\n' + if currout[-1] != '\n': + currout += '\n' + currout += '\n' if reverse: revoutput.append(currout) else: