Open tstehr opened 1 year ago
@AberDerBart and I checked the case of multiple approximate yields (commonmark dingus, babelmark). It produces good markdown output in commonmark implementations
for compability/customization purposes we could also allow just an arbitrary Prefix and only require that exactly one number is contained in the amout. This would allow things like ca. 4 Cookies
and about 4 Cookies
, while some Cookies
and 3 - 4 Cookies
would be invalid
In #38 a did a survey of recipes that will be considered invalid once we fix the incorrect treatment of amounts without factors. On thing that came out of that is users like to mark amounts as approximate, in particular for the yield amount of a recipe.
Of the 43 recipes that had an error, 12 were instances of approximate yields. Additionally there was one recipe using an approximate ingredient amount.
Use cases
The survey turned up 3 use cases:
I've also wanted a syntax like this in my own use from time to time, mostly for uses cases 2 and 3.
Syntax and spec ideas
For syntax 9 recipes used
~
as a prefix for the amount (~3 Portionen
) the remaining 4 usedca
/ca.
. I'd also prefer using~
independently of existing use as it is not language specific.For the spec right now my idea is to allow an optional
~
prefix for amounts in yields and ingredients. This translates into a booleanapproximate
flag added to the amount data type. The semantics of that flag would be "The recipe author has indicated that the amount is approximate". If a more detailed explanation of what that entails is required authors need to put that in the instructions.