mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Formatter: Fix newlines after child types
This commit is contained in:
parent
72edce9670
commit
b692a35398
1 changed files with 6 additions and 1 deletions
|
@ -44,7 +44,12 @@ class Format:
|
||||||
|
|
||||||
if item_as_string in OPENING_TOKENS:
|
if item_as_string in OPENING_TOKENS:
|
||||||
split_string = tokenized_str.splitlines()
|
split_string = tokenized_str.splitlines()
|
||||||
split_string.insert(-1, "")
|
|
||||||
|
index = -1
|
||||||
|
if "[" in split_string[-2] and "]" in split_string[-2]:
|
||||||
|
index = -2
|
||||||
|
|
||||||
|
split_string.insert(index, "")
|
||||||
tokenized_str = "\n".join(split_string)
|
tokenized_str = "\n".join(split_string)
|
||||||
|
|
||||||
indent_levels += 1
|
indent_levels += 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue