fix: preserve table row boundaries

28
5mo ago
+122-36

Summary

  • Preserve row boundaries in HtmlTable.text by joining cell text per row and separating rows with blank lines.
  • Update CSV/TSV/XLSX table text expectations and add unit coverage for blank-row suppression.
  • Fixes #4235

Testing

  • uv run --no-sync ruff format --check unstructured/common/html_table.py test_unstructured/common/test_html_table.py test_unstructured/partition/test_constants.py test_unstructured/partition/test_csv.py test_unstructured/partition/test_tsv.py test_unstructured/partition/test_xlsx.py && uv run --no-sync ruff check unstructured/common/html_table.py test_unstructured/common/test_html_table.py test_unstructured/partition/test_constants.py test_unstructured/partition/test_csv.py test_unstructured/partition/test_tsv.py test_unstructured/partition/test_xlsx.py
  • uv run --no-sync pytest test_unstructured/common/test_html_table.py test_unstructured/partition/test_csv.py test_unstructured/partition/test_tsv.py test_unstructured/partition/test_xlsx.py -q

Note

  • scripts/version-sync.sh -c -f unstructured/__version__.py semver could not complete locally on macOS because the script requires GNU sed >= 4.3; CHANGELOG.md and unstructured/__version__.py were manually synced to 0.23.3.