From babcc42ea2e2a04fcde568c6111f29f60612e7f9 Mon Sep 17 00:00:00 2001 From: gregorni Date: Mon, 21 Aug 2023 23:14:11 +0200 Subject: [PATCH] Formatter: Fix newlines missing sometimes --- blueprintcompiler/formatter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprintcompiler/formatter.py b/blueprintcompiler/formatter.py index 793aa42..55332e5 100644 --- a/blueprintcompiler/formatter.py +++ b/blueprintcompiler/formatter.py @@ -111,9 +111,9 @@ class Format: # else: # current_line = current_line.strip() + " " - tokenized_str = "\n".join( - [s.strip() if s.strip() == s else s for s in tokenized_str.splitlines()] - ) + tokenized_str = "\n".join( + ["" if s.strip() == "" else s for s in tokenized_str.splitlines()] + ) print(tokenized_str) # TODO: Remove this when the MR is ready to be merged