We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 281da29 commit 1ee48d7Copy full SHA for 1ee48d7
1 file changed
unstructured/chunking/base.py
@@ -854,10 +854,7 @@ def _table_text(self) -> str:
854
def _text_with_overlap(self) -> str:
855
"""The text for this chunk, including the overlap-prefix when present."""
856
overlap_prefix = self._overlap_prefix
857
- if not self._table.text:
858
- table_text = ""
859
- else:
860
- table_text = self._table.text.strip()
+ table_text = "" if not self._table.text else self._table.text.strip()
861
# -- use row-separator between overlap and table-text --
862
return overlap_prefix + "\n" + table_text if overlap_prefix else table_text
863
0 commit comments