Skip to content

v9.5.4 - Fix bookmark-only paragraph preservation

Choose a tag to compare

@ItMeDiaTech ItMeDiaTech released this 26 Jan 03:13
· 81 commits to main since this release

Fixed

  • Bookmark-Only Paragraph Preservation
    • Fixed document corruption when paragraphs contain only bookmarks (no text runs)
    • Bookmarks like _Rationale, _Definitions, _Log_Activity were incorrectly removed during addStructureBlankLines()
    • Root cause: parseParagraphFromObject() didn't parse w:bookmarkStart/w:bookmarkEnd elements from XML objects
    • Root cause: isParagraphBlank() returned true for empty content before checking for bookmarks
    • Now correctly parses bookmarks in both _orderedChildren and fallback code paths
    • Bookmark check moved to beginning of isParagraphBlank() to catch bookmark-only paragraphs

Changed

  • Bookmark Parsing in DocumentParser
    • Added w:bookmarkStart and w:bookmarkEnd handling to parseParagraphFromObject()
    • Bookmarks are now correctly attached to paragraphs when loaded via XML object parsing path

Installation

npm install docxmlater@9.5.4