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 = []