Skip to content

Skip empty Word text elements without consuming following content - #159

Merged
ralyodio merged 3 commits into
profullstack:masterfrom
RowletCC:fix/docx-empty-text
Sep 21, 2026
Merged

ralyodio merged 3 commits into
profullstack:masterfrom
RowletCC:fix/docx-empty-text

Conversation

@RowletCC

Copy link
Copy Markdown
Contributor

A valid empty Word text element such as <w:t /> or <w:t xml:space="preserve"/> is currently interpreted as the opening of a text element. The importer then consumes through the next closing text tag: <w:t /><w:t>Engineer</w:t> imports as <w:t>Engineer. Intervening line breaks and tabs can also turn into literal XML instead of controls.

Exclude self-closing openings from the paired-text match. Empty elements contribute no text, while subsequent text and controls are processed independently. This is separate from the existing paragraph/run opening-tag whitespace PR.

Validation: unchanged upstream fails five of the eight new cases and passes three controls. All eight new cases, the existing Word emphasis test, and the existing DOCX inline-control fixture pass after the fix (10 total). Build and TypeScript no-emit checks pass; the new test file passes Prettier. Cases cover spaced and attributed empty elements, line breaks, tabs, carriage returns, emphasis, adjacent runs, and XML entity decoding. Production changes are limited to the text-element matcher and its comment.

Submitted under the published $0.25 USD-equivalent reward per valid bug-fix PR, using the existing application and settlement conversation. Settlement remains native SOL on Solana mainnet, subject to acceptance and confirmation of the exact token amount. No reward is claimed as received.

RowletCC and others added 3 commits September 21, 2026 00:54
Each of these PRs passed alone and failed together:

- profullstack#149 emits start="N" on ordered lists, so the profullstack#161 marker-width tests
  that begin at 12345 now expect the attribute.
- profullstack#131 resolves every federated host before connecting, so the profullstack#128
  directory salary tests pass allowPrivate like the other federation
  tests do.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit e2200c0 into profullstack:master Sep 21, 2026
4 checks passed
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.

2 participants