You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec states that separate steps should be separated with an empty line: "Each paragraph in your recipe file is a cooking step. Separate steps with an empty line.", but the test called testMultiLineDirections shows that two directions separated by a single line return are interpreted as two different steps.
To Reproduce
Check content of testMultiLineDirections in tests/canonical.yaml, which is about parsing the string "Add a bit of chilli\nAdd a bit of hummus"
Current behavior
The result section of the test reads:
steps:
-
- type: text
value: "Add a bit of chilli"
-
- type: text
value: "Add a bit of hummus"
metadata: []
Expected behavior
The result of the test should be
result:
steps:
-
- type: text
value: "Add a bit of chilli\nAdd a bit of hummus"
metadata: []
The text was updated successfully, but these errors were encountered:
I'm very interested in seeing this fixed — would be happy to help out with a patch, but I'm not quite sure where to start — seems like the part in Parser.ts where the input is split into lines would be the right place to deal with this, but I'm not sure I understand the logic behind the overall parsing process correctly?
There's an effort to migrate this parser to be powered by Rust parser via WASM and there's no sense patching current version. I pushed my latest changes and it parses recipe but because the return is just a big JS object it's not handy working with it. So as next step I wanted to create wrapper objects for better dev experience and TS definitions. I don't have much time to work on this, and it's not priority right now. If you want to take it from there I can give you as much support as I can.
Describe the bug
The spec states that separate steps should be separated with an empty line: "Each paragraph in your recipe file is a cooking step. Separate steps with an empty line.", but the test called
testMultiLineDirections
shows that two directions separated by a single line return are interpreted as two different steps.To Reproduce
Check content of
testMultiLineDirections
intests/canonical.yaml
, which is about parsing the string "Add a bit of chilli\nAdd a bit of hummus"Current behavior
The
result
section of the test reads:Expected behavior
The result of the test should be
The text was updated successfully, but these errors were encountered: