mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 18:56:59 -06:00
si_body returned as soon as no valid run was written, so a shared string with a <phoneticPr> and no <rPh> — a shape §18.4.8 allows — lost its properties on save even though the reader keeps them. The runs and the properties are now written independently: valid runs as before, then the valid <phoneticPr> when the workbook has one; with neither, the <si> is exactly the plain t_el output. property_only_shared_string_survives_open_and_save covers read, save and reopen, and the si_body damaged-data test now expects the property-only output. The write-time checks the reader also runs (sb/eb clamped into the UTF-16 length, empty readings skipped, type/alignment filtered through the shared PHONETIC_KINDS/PHONETIC_ALIGNMENTS) were already in the head; the tests above pin them, so no further change there. Docs: the .xlsx row and the revision history now state that the shared string table holds each text once, so duplicate <si> items with the same text but different readings keep only the first reading (reported as a warning on open), and that a <phoneticPr> without runs is kept. Both parity docs' "Last updated" headers match their 2026-10-20 revision rows; the earlier rows keep their dates.