Commit sur main · 77a6266 · @rmdes
A category arrives as typed. Surrounding whitespace, an empty value from a blank form field, and the same word in another case each became a distinct category on the site, and every list built from categories, the q=category query included, grew a near-duplicate for it. Trim each value, drop the empties, and fold case-insensitive duplicates onto the first spelling given, at the point where properties are normalised so every write path is covered. A category left with nothing is removed rather than stored as an empty array. Casing is otherwise left as the author wrote it: folding onto a canonical spelling is a separate question.