From f3260f21748199d272811faa4cc43c692d9cdace Mon Sep 17 00:00:00 2001 From: tligui_y Date: Fri, 18 Jul 2025 10:12:25 +0200 Subject: [PATCH] Update json_to_md.py --- json_to_md.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/json_to_md.py b/json_to_md.py index e8188698..d13b83fc 100644 --- a/json_to_md.py +++ b/json_to_md.py @@ -212,7 +212,7 @@ def json_to_md_nested(json_path, md_path, runtime_params=None): collectors_sorted = sorted(collectors, key=lambda c: c.get("nodeid", "").split("[")[0]) folder_body = "" - for collector in collectors_sorted: + for i, collector in enumerate(collectors_sorted, 1): outcome = collector.get("outcome", "unknown") emoji = "✅" if outcome == "passed" else "❌" nodeid = collector.get("nodeid", "unknown") @@ -227,14 +227,12 @@ def json_to_md_nested(json_path, md_path, runtime_params=None): else: body_coll += "- **Details:** `None`\n" - # ⬇️ Ajout de l’indentation manuelle Gitea-compatible folder_body += f"-
\n" folder_body += f" {emoji} {short_node}\n\n" - for line in get_details_block(f"{emoji} {short_node}", body_coll, level=2).splitlines(): + for line in body_coll.strip().splitlines(): folder_body += f" {line}\n" folder_body += f"
\n\n" - # ⬇️ Écriture finale avec indentation f.write(f"-
\n") f.write(f" {folder_emoji} {folder} ({len(collectors)} tests)\n\n") for line in (folder_body + body_collectors).splitlines():