From 74de56c565bb931e16a3609d7e70cd9455f9049c Mon Sep 17 00:00:00 2001 From: George Marchment <georgemarchment@yahoo.fr> Date: Tue, 22 Apr 2025 14:39:49 +0200 Subject: [PATCH] Update the conditions to enable multi line conditions --- src/outils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/outils.py b/src/outils.py index 1cb9190..a5d8d5c 100644 --- a/src/outils.py +++ b/src/outils.py @@ -997,7 +997,7 @@ def extract_conditions(code, only_get_inside = True): conditions = [] 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): found_if_bloc = True condition = match.group(1) -- GitLab