From b9ee5b685925c136f696f717de9f6ad1836ac0d7 Mon Sep 17 00:00:00 2001 From: Thomas Neidhart Date: Tue, 10 Dec 2024 11:50:31 +0100 Subject: [PATCH] fix: prevent spurious newlines when printing text larger than the console width --- otterdog/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/otterdog/utils.py b/otterdog/utils.py index 640f8d02..3e9a4a9c 100644 --- a/otterdog/utils.py +++ b/otterdog/utils.py @@ -286,10 +286,10 @@ def print(self, text: str = "", highlight: bool = False) -> None: self._print_indentation() if line.endswith("\n"): - self._console.print(line[:-1], end="", highlight=highlight) + self._console.print(line[:-1], end="", highlight=highlight, new_line_start=True) self.print_line_break() else: - self._console.print(line, end="", highlight=highlight) + self._console.print(line, end="", highlight=highlight, new_line_start=True) def println(self, text: str = "", highlight: bool = False) -> None: self.print(text, highlight=highlight)