Skip to content

Commit b3cf28a

Browse files
author
Sam Clements
authored
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 `<br>`.
1 parent 83d6e1b commit b3cf28a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytest_html/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def append_log_html(self, report, additional_html):
263263
converter = Ansi2HTMLConverter(inline=False, escaped=False)
264264
content = converter.convert(content, full=False)
265265
log.append(raw(content))
266+
log.append(html.br())
266267

267268
if len(log) == 0:
268269
log = html.div(class_='empty log')

0 commit comments

Comments
 (0)