From b3cf28a84bca109df06610877acb945b4b1211ed Mon Sep 17 00:00:00 2001 From: Sam Clements Date: Tue, 9 Jul 2019 14:14:39 +0100 Subject: [PATCH] Append a line break after captured log sections The content in log sections doesn't always include a trailing newline, so this includes one afterwards ensuring that the next section header is placed on a new line. If there's already a trailing newline, this has no effect as it uses `
`. --- pytest_html/plugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytest_html/plugin.py b/pytest_html/plugin.py index 3903c1cf..15a83964 100644 --- a/pytest_html/plugin.py +++ b/pytest_html/plugin.py @@ -263,6 +263,7 @@ def append_log_html(self, report, additional_html): converter = Ansi2HTMLConverter(inline=False, escaped=False) content = converter.convert(content, full=False) log.append(raw(content)) + log.append(html.br()) if len(log) == 0: log = html.div(class_='empty log')