From 1faf59fdccb854b3338bc5a8f9ebf47f3035b785 Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Wed, 2 Apr 2025 14:15:46 +0200
Subject: [PATCH] Update the extraction of the origins

---
 src/operation.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/operation.py b/src/operation.py
index 9be8afa..37c20af 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:
 
-- 
GitLab