From 9e925d2cd601fc190b250819d182f81b5bda58c2 Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Wed, 19 Mar 2025 16:15:26 +0100
Subject: [PATCH] Added strip to the single line conversion to avoid a bug

---
 src/code_.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/code_.py b/src/code_.py
index f9ea145..dab97af 100644
--- a/src/code_.py
+++ b/src/code_.py
@@ -106,7 +106,7 @@ class Code:
                                 _, end_condition = match.span(1)
                                 extracted_condition = get_code_until_parenthese_count(code=temp_code[end_condition:], val=-1)
                                 condition = extracted_condition[:-1]
-                                body = extarcted.replace(extracted_condition.strip(), "")
+                                body = extarcted.replace(extracted_condition.strip(), "").strip()
                                 if(body!="" and body[0]!="{"):
                                     new = f"if ({condition}) {{\n{body}\n}}\n"
                                     to_replace.append((all, new))
-- 
GitLab