Formatter: Fix newlines missing sometimes

This commit is contained in:
gregorni 2023-08-21 23:14:11 +02:00
parent e165ea5594
commit babcc42ea2

View file

@ -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