From e259d8ec597f462fe4a5f41266c89c5705ff4d2c Mon Sep 17 00:00:00 2001
From: George Marchment <georgemarchment@yahoo.fr>
Date: Tue, 15 Apr 2025 11:18:45 +0200
Subject: [PATCH] updated the extraction of the pos (it wasn't working on
 operations)

---
 src/outils_graph.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/outils_graph.py b/src/outils_graph.py
index 4091730..e5e08c2 100644
--- a/src/outils_graph.py
+++ b/src/outils_graph.py
@@ -1270,7 +1270,7 @@ def enrich_json_with_positions(file):
     
     def search_for_pos(id, text):
         import re
-        pattern = re.escape(id)+r'.+\n.+\s+pos="([^,]+),([^"]+)",'
+        pattern = re.escape(id)+r'[\s\S]*?(?=pos)pos="([^,]+),([^"]+)",'
         for match in re.finditer(pattern, text):
             return match.group(1), match.group(2)
         return -1, -1
-- 
GitLab