fix: retain coordinates when classifying text as an email address

AF
11h ago
+52-1

Summary

element_from_text() accepts coordinates and a coordinate system, but its email-address branch constructs EmailAddress with text alone. Direct callers lose the supplied location whenever text is classified as an email address, while the other text categories retain it.

Forward the two existing arguments to EmailAddress. This restores coordinate serialization and rehydration for this classification path. Calls without coordinates, and header/footer classification precedence, keep their existing behavior.

Validation

  • This change's six cases produce 3 failures and 3 passing controls on the original source.
  • Covers pixel, point and relative coordinate systems, dictionary rehydration, absent coordinates, and header/footer precedence.
  • A combined fork validation branch first runs the new regressions against the pinned original production files: 18 failures, 5 passing controls. After restoring the final source files, the regressions plus all chunking tests, document element tests and text partition tests report 891 passed, 2 skipped on Python 3.12.
  • Ruff check and format check pass with the repository configuration. Source-integrity checks pass after the before/after run.
  • Validation run, exact commands and JUnit artifacts.

Checklist

  • User-facing conventional-commit title.
  • Maintainer: please apply the bug category label.