Skip to content

Commit 77d8335

Browse files
committed
Fixed logic which would add empty elements to with lists, by copying updated logic from normal lists
1 parent d20766b commit 77d8335

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nix_tree/decomposer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ def __managing_the_rest_of_the_file(self) -> None:
301301
for phrase_itr in range(equals_locations[iterator.equals_number][1] + place_to_check + 4, len(rest_of_file_without_lines)):
302302
if rest_of_file_split[phrase_itr] == "];":
303303
break
304+
if re.search(r"^\s*$", rest_of_file_split[phrase_itr]):
305+
continue
304306
in_the_brackets.append(f"({rest_of_file_split[equals_locations[iterator.equals_number][1] + place_to_check + 1]}"
305307
f").{rest_of_file_split[phrase_itr]}")
306308
self.__tree.add_branch(f"{iterator.prepend}[ {' '.join(in_the_brackets)} ]")

0 commit comments

Comments
 (0)