From af956e9aabba8646a66dd88572bdf11724ddbafe Mon Sep 17 00:00:00 2001 From: gregorni Date: Tue, 8 Aug 2023 17:02:08 +0200 Subject: [PATCH] Formatter: Improve indents at closing tokens --- blueprintcompiler/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprintcompiler/formatter.py b/blueprintcompiler/formatter.py index 6753767..81febf6 100644 --- a/blueprintcompiler/formatter.py +++ b/blueprintcompiler/formatter.py @@ -54,8 +54,8 @@ class Format: indent_levels += 1 elif item_as_string in CLOSING_TOKENS: - tokenized_str = tokenized_str[:-2] indent_levels -= 1 + tokenized_str = tokenized_str.strip() + "\n" + (indent_levels * " ") if item_as_string in WHITESPACE_BEFORE: tokenized_str = tokenized_str.strip() + " "