From a5ff70c21db1015a35c1aed37c8454639339ed1d Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 16 Mar 2021 01:05:20 +0200 Subject: scripts: Support multi-paragraph comments in HTML output for tasks When a comment contains multiple paragraphs, delimited by two or more consecutive newline characters, render them in

elements. This increases readability of the output. Signed-off-by: Laurent Pinchart Tested-by: Jacopo Mondi --- scripts/html_task.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/html_task.py b/scripts/html_task.py index 596b43b..1e6c175 100755 --- a/scripts/html_task.py +++ b/scripts/html_task.py @@ -163,7 +163,13 @@ class periject_html(html_base.myhtml): "target":"_blank"}) comment = str.string[:str.start()] + a.text(str.group()) + str.string[str.end():] - html("li").print(comment) + comment = re.split(r'\n\n+', comment) + if len(comment) > 1: + with html("li"): + for para in comment: + html("p").print(para) + else: + html("li").print(comment[0]) #-------------------- # print -- cgit v1.2.3