diff --git a/src/operation.py b/src/operation.py index 9be8afabf9d3438da4964b3d684e4265e300cea0..37c20af95edfb3d162860a48c1843eb6211a5865 100644 --- a/src/operation.py +++ b/src/operation.py @@ -382,13 +382,11 @@ class Operation(Executor): #Replace the emits and channels around parenthese by just themselves (without the parantheses) def replace(text): def replacer(match): - return match.group(0).replace(match.group(0), match.group(1)) - return re.sub(f"[^\w\s] *\(\s*({pattern})\s*\)", replacer, text) + return match.group(0).replace(match.group(1), match.group(2)) + return re.sub(fr"[^\w\s] *(\(\s*({pattern})\s*\))", replacer, text) operation = replace(operation) - - first_call = True for pattern in patterns: