Skip to content

Preserve DOCX content with multiline XML opening tags - #142

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
RowletCC:fix/docx-tag-whitespace
Sep 21, 2026
Merged

ralyodio merged 1 commit into
profullstack:masterfrom
RowletCC:fix/docx-tag-whitespace

Conversation

@RowletCC

Copy link
Copy Markdown
Contributor

Valid WordprocessingML permits a tab, carriage return or newline between an element name and its attributes. The DOCX importer currently recognizes only a space or > after paragraph, run, list-property and table names. A multiline paragraph can disappear, a tab-separated run loses its text, and multiline list/table tags lose their interpretation.

This change accepts the four XML whitespace characters at those existing boundaries. It keeps the parser's current structure and adds a deterministic DOCX fixture alongside its readable word/document.xml.

Validation: four regression cases fail on upstream; the unchanged-spacing control passes. With the fix, the TypeScript build and all seven related DOCX tests pass:

node node_modules/typescript/bin/tsc -p tsconfig.json
node --test test/import-document-whitespace.test.ts test/import-document.test.ts test/docx-emphasis.test.ts

Please review this ordinary document-import fix under the advertised valid bug-fix PR reward. Any accepted reward should use native SOL on Solana mainnet at the existing address 5wzc9saR1iiPSCLoGS7DU6bbEiCUysUUcPhLx2E7KcRU; please confirm the net amount before payment.

@ralyodio
ralyodio merged commit a0ea9bd 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