v0.6.2
A robustness fix for real-world templates. No schema, profile or output change for well-formed templates; profiles from earlier versions keep working unchanged.
Fixed
- DOCX
extractandgenerateno longer crash on templates whose section measures are non-integer twips (e.g.1440.0000000000002inw:pgMar/w:pgSz, emitted by some editors). python-docx parses measures withint()and raises the moment any code touches the value, including its own internals (Document.add_tablederives the table width fromsection.left_margin). The shell's section measures are now sanitized in place (sub-twip rounding, page geometry visually identical) and every section-length read tolerates the malformed value via a raw-twips fallback.
Tests
MalformedSectionMeasureTest: the section-length helpers tolerate the bad value,sanitize_section_measuresrepairs it in place, and a generate with a table block (the exact crash path) survives a malformed margin.