feat: Add original text preservation in chunking and export processes

This commit is contained in:
JB
2025-10-15 05:41:51 -07:00
parent 6ae8b827d2
commit 0a6d09445d
4 changed files with 22 additions and 2 deletions
+4
View File
@@ -59,6 +59,8 @@ def test_chunk_text_merges_title_abbreviations() -> None:
assert "Doctor" in normalized_value
display_value = str(chunk.get("display_text") or "")
assert display_value.startswith("Dr.")
original_value = str(chunk.get("original_text") or "")
assert original_value.startswith("Dr.")
def test_chunk_text_display_preserves_whitespace() -> None:
@@ -77,3 +79,5 @@ def test_chunk_text_display_preserves_whitespace() -> None:
assert first_display.endswith("\n\n")
second_display = str(chunks[1].get("display_text") or "")
assert second_display == "Third paragraph."
first_original = str(chunks[0].get("original_text") or "")
assert first_original.endswith("\n\n")