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:
@@ -55,6 +55,7 @@ def install_klipperscreen() -> None:
|
|||||||
warn_msg = [
|
warn_msg = [
|
||||||
"Moonraker not found! KlipperScreen will not properly work "
|
"Moonraker not found! KlipperScreen will not properly work "
|
||||||
"without a working Moonraker installation.",
|
"without a working Moonraker installation.",
|
||||||
|
"\n\n",
|
||||||
"KlipperScreens update manager configuration for Moonraker "
|
"KlipperScreens update manager configuration for Moonraker "
|
||||||
"will not be added to any moonraker.conf.",
|
"will not be added to any moonraker.conf.",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -148,7 +148,10 @@ class Logger:
|
|||||||
for i, c in enumerate(content):
|
for i, c in enumerate(content):
|
||||||
paragraph = wrapper.wrap(c)
|
paragraph = wrapper.wrap(c)
|
||||||
lines.extend(paragraph)
|
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)
|
lines.append(" " * line_width)
|
||||||
|
|
||||||
formatted_lines = [
|
formatted_lines = [
|
||||||
|
|||||||
Reference in New Issue
Block a user