Files
designcraft/crates
Hamza e7ef29d9d1 A page named twice in an export list is exported once (found while probing)
The same selection written two ways gave different files:

    file.exportPdf {"pages": "2,2"}   → 1 page
    file.exportPdf {"pages": [2, 2]}  → 2 pages, the second a copy
    file.exportPdf {"pages": [2,2,2]} → 3 pages

`parse_page_range` keeps the first of a repeat (`"2-2,2"` is one page too); the
array form appended whatever it was given. A list says which pages to export,
not how many times, so the array now drops a repeat as the string does. Both
`file.exportPdf` and `file.exportPptx` read the same parameter.

The test pins the agreement between the two forms over nine lists, in PDF and
PPTX, and the two facts I measured while checking it: the pages come out in the
document's order whichever order the list names them in, and `[2, 2]` is now
byte for byte the file `"2"` gives. A page that does not exist is still
refused, and an empty list still exports nothing.

Not from a ticket: I found it probing the page-range parameter.
2026-10-22 16:18:33 +05:00
..
2026-10-16 03:42:21 +00:00