mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Formatter: Improve indents at closing tokens
This commit is contained in:
parent
47b7ee8986
commit
af956e9aab
1 changed files with 1 additions and 1 deletions
|
@ -54,8 +54,8 @@ class Format:
|
||||||
|
|
||||||
indent_levels += 1
|
indent_levels += 1
|
||||||
elif item_as_string in CLOSING_TOKENS:
|
elif item_as_string in CLOSING_TOKENS:
|
||||||
tokenized_str = tokenized_str[:-2]
|
|
||||||
indent_levels -= 1
|
indent_levels -= 1
|
||||||
|
tokenized_str = tokenized_str.strip() + "\n" + (indent_levels * " ")
|
||||||
|
|
||||||
if item_as_string in WHITESPACE_BEFORE:
|
if item_as_string in WHITESPACE_BEFORE:
|
||||||
tokenized_str = tokenized_str.strip() + " "
|
tokenized_str = tokenized_str.strip() + " "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue