refactor(logger): double newline as content allows for a full blank line

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2024-05-04 20:41:01 +02:00
parent bf0385e3c9
commit 79b4f3eefe
2 changed files with 5 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ def install_klipperscreen() -> None:
warn_msg = [
"Moonraker not found! KlipperScreen will not properly work "
"without a working Moonraker installation.",
"\n\n",
"KlipperScreens update manager configuration for Moonraker "
"will not be added to any moonraker.conf.",
]

View File

@@ -148,7 +148,10 @@ class Logger:
for i, c in enumerate(content):
paragraph = wrapper.wrap(c)
lines.extend(paragraph)
if i < len(content) - 1:
# add a full blank line if we have a double newline
# character unless we are at the end of the list
if c == "\n\n" and i < len(content) - 1:
lines.append(" " * line_width)
formatted_lines = [