From 7c2b0d38d048f8c35d2cc638a650370bde13d913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Schl=C3=B6gl?= Date: Fri, 26 Apr 2024 09:51:47 +0200 Subject: [PATCH] fix: remove double spaces and spaces before commas from strings --- viecpro_typesense/handlers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/viecpro_typesense/handlers.py b/viecpro_typesense/handlers.py index 8086f87..ad30cfe 100644 --- a/viecpro_typesense/handlers.py +++ b/viecpro_typesense/handlers.py @@ -25,6 +25,7 @@ def fixstring(string): string = re.sub(REG_SKL, "", string) string = re.sub(REG_EKL, "", string) string = re.sub(REG_GKL, "", string) + string = string.replace(" ", " ").replace(" ,", ",") return string