fix(doc-viewer): table formatting + real .doc regression tests - #267
Merged
Conversation
Tested against real Word 97-2003 .doc files: extraction is correct for plain text, Unicode (smart quotes/accents/em-dash), long docs, tables and lists. Improved cleanup so table rows (a run of 2+ cell/row marks) become line breaks with tab-separated cells and leading tabs stripped, instead of collapsing onto one line. Adds two neutral binary .doc fixtures + tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuous-improvement pass on the legacy .doc viewer, validated against real Word 97-2003 .doc files (generated with macOS
textutil, neutral synthetic content).Verified correct on: plain text, Unicode (smart quotes, accents, em-dash), a 119-paragraph long doc, tables, and bulleted lists.
Improvement: tables previously collapsed onto one line (all cell/row marks → tabs). Now a run of 2+ marks (cell mark + row-end mark) becomes a line break, so tables render row-per-line with tab-separated cells, and leading tabs are stripped. Lists come out one bullet per line.
Regression tests: two neutral binary
.docfixtures + assertions (checked for identity/metadata leaks before committing — clean).Verify: 1330 tests green (incl. 2 new fixture tests), lint 0 errors.