diff --git a/pyproject.toml b/pyproject.toml index eb0ead5..7f251ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "tftui" -version = "0.10.1" +version = "0.10.2" description = "Terraform Textual User Interface" authors = ["Ido Avraham"] license = "Apache-2.0" diff --git a/tftui/state.py b/tftui/state.py index c3cf7ca..d26dc26 100644 --- a/tftui/state.py +++ b/tftui/state.py @@ -73,13 +73,13 @@ async def refresh_state(self) -> None: if line.startswith("#"): (fullname, name, submodule, type, is_tainted) = State.parse_block(line) contents = "" - elif line == "}": - contents += line + "\n" + elif line.startswith("}"): + contents += line.rstrip() + "\n" block = Block(submodule, name, type, is_tainted) block.contents = contents self.state_tree[fullname] = block else: - contents += line + "\n" + contents += line.rstrip() + "\n" if __name__ == "__main__":