fix: wrap <summary> by <details>

This commit is contained in:
张泊明518370910136 2024-10-09 14:42:15 -04:00
parent e6c406d6b5
commit 2f9c875d91
GPG Key ID: CA088E6D9284F870

View File

@ -202,9 +202,11 @@ def generate_title_and_comment(
comment += " - Failed"
comment += "\n"
for i, result in enumerate(stage["results"]):
comment += "<details>"
comment += f"<summary>Case {i} - Score: {result['score']}</summary>\n"
if result["comment"].strip() != "":
comment += f"<details>\n\n{result['comment']}\n</details>\n\n"
comment += f"{result['comment']}\n"
comment += "</details>\n\n"
total_score += result["score"]
comment += "\n"
title = f"JOJ3 Result for {exercise_name} - Score: {total_score}"