mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-29 17:55:45 +01:00
The number reader accepted unit spellings made of letters and unit symbols only, so the "/in" spelling of UnitKind::PerInch was never registered. In a field that draws its unit apart from the number, a typed "40/in" was then read as 40 divided by a quantity with no number, and the field refused it. A unit spelling may now start with one "/" followed by letters or unit symbols. After a number, the reader takes such a spelling when the letters after the "/" start it, so "40/in", "40 /in" and "40/IN" read as 40 per inch. Any other "/" still divides: "80/2" is 40, and a field without a "/in" spelling reads "/in" as before. Only UnitKind::PerInch has a spelling with a "/", so no other field changes.