mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-11 16:34:47 -06:00
without_controls found the controls to drop from a kept <controls> fragment by splitting its text on `shapeId="`. The control reader takes the attribute through the XML parser, which also accepts `shapeId='1025'`, so a producer's single-quoted control was modelled, its VML shape taken out of the kept drawing, and the control itself still kept: a save wrote it twice, the kept copy pointing at a shape that no longer existed. The kept child is now parsed and its controls found with the reader's own helpers (controls_of_child, shape_number), so what the reader modelled is what is dropped. The shape type check of the VML merge (`<v:shapetype id>`) accepts either quote style too, so a kept drawing that defines our shape type with single quotes is not given a second definition. Test: a_single_quoted_shape_id_is_dropped_from_the_kept_controls_too (the control is read once, nothing of it is kept, the saved sheet holds one control and no single-quoted copy, the VML one shape, and the file reads back with one control).