From 55acef957d8e10561a1ff9440065db4b91c0784d Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Thu, 28 Mar 2024 11:30:39 +0100 Subject: [PATCH] Fix HTML logging Append
only if a newline is supposed to be emitted. --- src/python/adgui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/adgui.py b/src/python/adgui.py index 0f0bbf10..c209348f 100755 --- a/src/python/adgui.py +++ b/src/python/adgui.py @@ -253,9 +253,11 @@ class adgui(QObject): color = colors[level - ad.MSG_EXT_ERROR] html = None if level <= ad.MSG_WARNING: - html = f"{s}
\n" + html = f"{s}" elif level < ad.MSG_TRACE: - html = f"{s}
\n" + html = f"{s}" + if not no_nl or s[-1] == '\n': + html += "
\n" if s != "" and s != "\n": new_bol = not no_nl or (s[-1] == '\n') if not no_nl: