mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
formatter.py: fix newlines being indented a space too much
This commit is contained in:
parent
1933529f09
commit
9a77b51dce
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ class Format:
|
|||
if str(item) in newline_after + closing_tokens + opening_tokens:
|
||||
tokenized_str += "\n"
|
||||
tokenized_str += indent_levels * " "
|
||||
|
||||
else:
|
||||
tokenized_str += " "
|
||||
if tokenized_str == tokenized_str.strip():
|
||||
tokenized_str += " "
|
||||
|
||||
print(tokenized_str)
|
||||
|
||||
return tokenized_str
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue