Skip to content
Snippets Groups Projects
Commit 9e925d2c authored by George Marchment's avatar George Marchment
Browse files

Added strip to the single line conversion to avoid a bug

parent 96d9a717
No related branches found
No related tags found
No related merge requests found
Pipeline #14478 failed with stage
in 2 minutes and 40 seconds
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment