Skip to content

v9.5.0 - Granular Numbering Modification Tracking

Choose a tag to compare

@ItMeDiaTech ItMeDiaTech released this 24 Jan 12:34
· 81 commits to main since this release

What's New

Granular Numbering Modification Tracking

This release introduces selective XML merge for numbering.xml, which preserves original bullet styles, fonts, and formatting when processing existing documents.

Problem Solved: Previously, when any numbering was modified, the entire numbering.xml was regenerated from scratch. This caused documents with 186 original abstractNumIds to be reduced to ~40, losing original bullet styles (e.g., open circle bullets becoming filled bullets).

Solution: The framework now tracks which abstract numberings are new, modified, or deleted separately, and only regenerates what's necessary while preserving the original XML for unmodified numberings.

New Features

NumberingLevel Getter Methods

  • getLeftIndent() - Get left indentation in twips
  • getHangingIndent() - Get hanging indentation in twips

NumberingManager New Methods

  • markAbstractNumberingModified(id) - Mark a numbering as modified
  • getModifiedAbstractNumIds() - Get set of modified abstract numbering IDs
  • getNewAbstractNumIds() - Get set of newly added abstract numbering IDs
  • getDeletedAbstractNumIds() - Get set of deleted abstract numbering IDs
  • hasSelectiveChanges() - Check if selective merge should be used
  • generateNumberingXmlSelective(originalXml) - Merge changes with original XML
  • isLoadComplete() - Check if initial document loading is complete

Bug Fixes

  • Bullet Style Preservation: Open circle bullets (Courier New "o") no longer become filled bullets (Symbol) after processing
  • Original bullet fonts and characters are preserved when numbering is not explicitly modified

Installation

npm install docxmlater@9.5.0