Fix parser for personal recipes: newlines, ranges, &, markdown-style headings
Three categories of fixes:
1. Multi-line steps: removed \n from pText exclusion list so newlines
within a step are consumed as regular text
2. Range timers (e.g. ~{14-18%minutes}): handle hyphen-separated
ranges in parseSimpleRational by taking the lower value
3. & in ingredient names: added & to pSingleNameChar and
pMultiNameChar char sets
4. Markdown-style # headings: added pAnyChar fallback so # followed
by invalid cookware name falls through to text consumption
5. Note detection: tightened > check to require > (with space)
or > followed by non->, preventing >> metadata from being
treated as notes
This commit is contained in:
@@ -57,6 +57,14 @@ executables:
|
||||
- optparse-applicative
|
||||
- roux-server
|
||||
- unix
|
||||
check-recipes:
|
||||
main: Main.hs
|
||||
source-dirs: app/check-recipes
|
||||
dependencies:
|
||||
- directory
|
||||
- filepath
|
||||
- roux-server
|
||||
- text
|
||||
|
||||
tests:
|
||||
roux-server-test:
|
||||
|
||||
Reference in New Issue
Block a user