mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
The previous implementation of parsing ingredients was very simple. I now wrote a parser that I would consider good. It takes care of several edge cases and notations. - Supports fraction unicode (½, ¼, ⅜, ...) - Supports notations like `1½` and `1 1/2` - Supports unit directly after the amount without space inbetween (`2g`, `2½g`) - Supports notes (`5g onion (cubed)` -> amount: 5, unit: g, ingredient: onion, note: cubed) - Supports notes (`5g onion, cubed` -> amount: 5, unit: g, ingredient: onion, note: cubed) - Does not break when both commas and brackets exist