Repository navigation
Commit e580508
authored
fix: fall back to w:t when w:del lacks w:delText in revision parsing (#34)
* fix: fall back to w:t when w:del lacks w:delText in revision parsing
Nonconforming producers sometimes leave plain w:t inside w:del, which
made such deletions appear in list_revisions() with empty text. When a
w:del contains no w:delText elements, extract text from w:t instead.
The fallback only fires on an empty w:delText node list, so conforming
documents behave identically.
* docs: clarify scope of w:delText fallback comment
Multi-reviewer pass confirmed the logic but flagged that the mixed-
content behavior (w:delText present alongside stray w:t reads only
w:delText) and the deliberate-fallback nature were documented only in
tests. State both in the code comment. Skipped as out of scope: nested
w:ins filtering in the fallback (doubly-malformed input only).1 parent 72c5479 commit e580508
2 files changed
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1644 | 1644 | | |
1645 | 1645 | | |
1646 | 1646 | | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1647 | 1652 | | |
1648 | 1653 | | |
1649 | 1654 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1647 | 1647 | | |
1648 | 1648 | | |
1649 | 1649 | | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
1650 | 1703 | | |
1651 | 1704 | | |
1652 | 1705 | | |
| |||
0 commit comments