From e6c406d6b57c20e4f6aba3de4f3c5a3f19d81bf0 Mon Sep 17 00:00:00 2001 From: BoYanZh Date: Wed, 9 Oct 2024 05:13:54 -0400 Subject: [PATCH] feat: hide empty comment --- joint_teapot/utils/joj3.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/joint_teapot/utils/joj3.py b/joint_teapot/utils/joj3.py index 9245c0c..df6fcd1 100644 --- a/joint_teapot/utils/joj3.py +++ b/joint_teapot/utils/joj3.py @@ -203,11 +203,9 @@ def generate_title_and_comment( comment += "\n" for i, result in enumerate(stage["results"]): comment += f"Case {i} - Score: {result['score']}\n" - comment += "
\n\n" if result["comment"].strip() != "": - comment += f"{result['comment']}\n" + comment += f"
\n\n{result['comment']}\n
\n\n" total_score += result["score"] - comment += "
\n\n" comment += "\n" title = f"JOJ3 Result for {exercise_name} - Score: {total_score}" return title, comment