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

Update the conditions to enable multi line conditions

parent 1084e0c0
No related branches found
No related tags found
No related merge requests found
Pipeline #14654 failed with stage
in 2 minutes and 30 seconds
...@@ -997,7 +997,7 @@ def extract_conditions(code, only_get_inside = True): ...@@ -997,7 +997,7 @@ def extract_conditions(code, only_get_inside = True):
conditions = [] conditions = []
if(code[start:start+2]=="if" and [quote_single, quote_double, triple_single, triple_double]==[False, False, False, False]): if(code[start:start+2]=="if" and [quote_single, quote_double, triple_single, triple_double]==[False, False, False, False]):
for match in re.finditer(r"if *\((.+)\)\s*\{", code[start:]): for match in re.finditer(r"if *\(((.|\n)+)\)\s*\{", code[start:]):
if(match.span(0)[0]==0): if(match.span(0)[0]==0):
found_if_bloc = True found_if_bloc = True
condition = match.group(1) condition = match.group(1)
......
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