Skip to content

Commit

Permalink
Fixed logic which would add empty elements to with lists, by copying …
Browse files Browse the repository at this point in the history
…updated logic from normal lists
  • Loading branch information
max-amb committed Oct 29, 2024
1 parent d20766b commit 77d8335
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nix_tree/decomposer.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ def __managing_the_rest_of_the_file(self) -> None:
for phrase_itr in range(equals_locations[iterator.equals_number][1] + place_to_check + 4, len(rest_of_file_without_lines)):
if rest_of_file_split[phrase_itr] == "];":
break
if re.search(r"^\s*$", rest_of_file_split[phrase_itr]):
continue
in_the_brackets.append(f"({rest_of_file_split[equals_locations[iterator.equals_number][1] + place_to_check + 1]}"
f").{rest_of_file_split[phrase_itr]}")
self.__tree.add_branch(f"{iterator.prepend}[ {' '.join(in_the_brackets)} ]")
Expand Down

0 comments on commit 77d8335

Please sign in to comment.