From ffc63d19dc345230bff357d40cad9fcba3fb9d6f Mon Sep 17 00:00:00 2001 From: Midgard Date: Tue, 25 Jun 2019 01:03:30 +0200 Subject: [PATCH] Improve line stripping --- tab | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tab b/tab index 667a1a6..66e44f4 100755 --- a/tab +++ b/tab @@ -51,7 +51,7 @@ def formatted_transaction(transaction, me, balance_after=None): to_account = TAP_ACCOUNT if issuer == "Tap" else FOOD_ACCOUNT to_line = f"{to_account} {amount}" - from_line = f"tab {assertion}".rstrip() + from_line = f"tab {assertion}" else: to_line = f"tab {amount} {assertion}" @@ -60,8 +60,8 @@ def formatted_transaction(transaction, me, balance_after=None): return "\n".join([ header, - "\t" + to_line, - "\t" + from_line + "\t" + to_line.rstrip(), + "\t" + from_line.rstrip() ])