From 85f2ea2b669b623a9c02aa31b709f1884ce78096 Mon Sep 17 00:00:00 2001 From: "David S. Batista" Date: Thu, 12 Dec 2024 14:06:31 +0100 Subject: [PATCH] Update haystack/components/preprocessors/recursive_splitter.py Co-authored-by: Sebastian Husch Lee --- haystack/components/preprocessors/recursive_splitter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haystack/components/preprocessors/recursive_splitter.py b/haystack/components/preprocessors/recursive_splitter.py index 19b420c059..9986654058 100644 --- a/haystack/components/preprocessors/recursive_splitter.py +++ b/haystack/components/preprocessors/recursive_splitter.py @@ -142,7 +142,7 @@ def _chunk_text(self, text: str) -> List[str]: escaped_separator = re.escape(curr_separator) splits = re.split(escaped_separator, text) - if len(splits) == 1: # go to next separator, if current separator not found + if len(splits) == 1: # go to next separator, if current separator not found in the text continue chunks = []