Skip to content

Normalize Key facts and Key dates headings during import - #766

Merged
benbrasso merged 1 commit into
mainfrom
codex/key-facts-dates-import
Jul 27, 2026
Merged

Normalize Key facts and Key dates headings during import#766
benbrasso merged 1 commit into
mainfrom
codex/key-facts-dates-import

Conversation

@mikec-ai

Copy link
Copy Markdown
Collaborator

Closes #764.

What changed

  • Normalize exact Key facts and Key dates labels to Heading 4 during import.
  • Handle labels imported as headings, plain paragraphs, or bold paragraphs.
  • Support labels inside a one-cell callout table or immediately before one.
  • Ignore empty Word spacer paragraphs when associating a label with its table.
  • Preserve substantive intervening content and leave longer labels or multi-cell tables unchanged.

Why

Word documents can represent these labels with different heading levels or as ordinary paragraph text. The existing import logic preserved those differences, so the same callout could receive an inconsistent heading level or no heading at all.

User impact

Users can import these common Word structures without manually correcting the Key facts and Key dates heading level in NOFO Builder. This normalization happens only during import, so users can still edit the content afterward.

Validation

  • Added focused parser coverage for supported and intentionally excluded structures.
  • Added five representative Word fixtures and exercised them through the real Mammoth import path.
  • Rendered and visually checked the Word fixtures.
  • 17 focused parser and Word-import tests pass.
  • Full test suite passes: 1,531 tests.
  • Completed an independent review and follow-up review with no remaining actionable findings.

@mikec-ai
mikec-ai requested a review from benbrasso July 24, 2026 18:58
@mikec-ai
mikec-ai marked this pull request as ready for review July 24, 2026 19:07
@mikec-ai
mikec-ai force-pushed the codex/key-facts-dates-import branch 2 times, most recently from bf66a96 to 85d98e5 Compare July 27, 2026 12:56
@mikec-ai
mikec-ai force-pushed the codex/key-facts-dates-import branch from 85d98e5 to 81cc05a Compare July 27, 2026 13:00
@benbrasso
benbrasso merged commit 85522af into main Jul 27, 2026
2 checks passed
@benbrasso
benbrasso deleted the codex/key-facts-dates-import branch July 27, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce Heading 4 for "Key Facts"/"Key Dates" section headers on import

2 participants