mirror of
https://github.com/storytold/indd-utils.git
synced 2026-11-19 16:50:48 +01:00
text_ranges read only ParagraphStyleRange children of the story and their CharacterStyleRange children. Ranges inside HyperlinkTextSource, CrossReferenceSource, XMLElement, Change and EndnoteRange were skipped, and their text was left out of the offsets, so every later range of the story started earlier in the reference than in the output. It now walks through those wrappers at any depth. Trustworthy pairs (compare.py --exclude own/): - hyperlink and cross-reference sources alone: reference values 11,142,835 -> 11,158,348, reproduced 10,501,458 -> 10,505,081, extra values 30,237 -> 26,634 - with XMLElement, Change and EndnoteRange (counted as the headline must include everything InDesign writes): reference values 11,508,691, coverage 94.24 % -> 91.28 %; 348,306 of the 350,343 new values are in one document - story text unchanged (18,517 of 18,610); documents >= 99 %: 18 - three keys reproduce one value fewer (CSR.Underline, PSR.Justification, PSR.P.TabList): ranges that matched at a shifted offset before