-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
I have a recipe that has a yield of 1.75 cups, and I marked it as such in the metadata:
---
servings: 1.75 # cup
---
Some instructions...However, the playground gives me a warning:
Warning: Unsupported value for key: 'servings'
╰▶ Expected 'number' but got 'number'
╭─[playground]
│
2 │ servings: 1.75 # cup
┆ ─
──╯
And scaling doesn't work (behaves as if servings: 1 is set).
It looks like this is because the as_servings function in metadata.rs only tries u32 and string:
Lines 393 to 397 in b86eec6
| fn as_servings(&self) -> Option<Servings> { | |
| // Try as number first | |
| if let Some(n) = self.as_u32() { | |
| return Some(Servings::Number(n)); | |
| } |
Workaround
I could change the unit to be a whole number, but this isn't ideal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels