mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-08 02:30:09 +00:00
Each gradient definition that no swatch names took its name by trying `Gradient`, `Gradient 2`, `Gradient 3`, ... from the start, so a document with many such gradients tried every earlier name again for each new one. The writer now keeps the number the next search starts from, and still skips names that a gradient, swatch or pattern already has. - A test names 1,000 gradients around two taken names and checks that each name is tried once (1,002 tries; 502,496 when each search starts over). - An export test writes 300 gradients next to a `Gradient 3` swatch and a `Gradient 7` pattern, and checks the names in order and the same output when written again. It passes with the old search too.