mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-08 19:42:12 +00:00
forms() tested a prefix rule's condition on the stem only, then added the prefix to every cross-product suffix form as well. contains() tests the condition on what the prefix comes off: the stem for the prefix alone, the suffix form in a cross product. So forms() could list a cross product the checker rejects (q over an empty suffix form under the condition x) and miss one it accepts. A small helper, prefixed(), now adds a prefix the way the checker takes it back off, for the stem and for each cross-product suffix form. The tests cover a cross product that meets the condition and one that does not. Over the whole hunspell-lv lv_LV dictionary the listed forms are unchanged (4,515,511, all accepted). Ported from storytold/wordcraft#5012 (8d84a49f5) onto craft-proof. Adapted to flag ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FypgCX8LsYYE8fsj4byBm2