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

update th rewrite on a single line else if

parent 0d92a6ad
No related branches found
No related tags found
No related merge requests found
Pipeline #14685 failed with stage
in 5 minutes and 28 seconds
......@@ -130,8 +130,7 @@ class Code:
_, end_line = match.span(0)
all = match.group(0)
extarcted = match.group(2).strip()
if(extarcted!="" and extarcted[0] not in ["{"] and extarcted[-1] not in ["{", "}"]):
if(extarcted!="" and extarcted[0] not in ["{"] and extarcted[-1] not in ["{", "}"] and not bool(re.fullmatch(r"if *\(.+", extarcted))):
new = f"else {{\n{extarcted}\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