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:
2026-05-19 12:58:43 -04:00
parent 1e150e703e
commit c55a54796a
7 changed files with 133 additions and 25 deletions
+32
View File
@@ -51,6 +51,38 @@ library
, warp
default-language: Haskell2010
executable check-recipes
main-is: Main.hs
other-modules:
Paths_roux_server
autogen-modules:
Paths_roux_server
hs-source-dirs:
app/check-recipes
default-extensions:
DerivingStrategies
LambdaCase
OverloadedStrings
TupleSections
ghc-options: -Wall -Werror -Wcompat -Widentities -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-export-lists -Wmissing-home-modules -Wpartial-fields -Wredundant-constraints
build-depends:
base >=4.7 && <5
, blaze-html
, blaze-markup
, bytestring
, containers
, directory
, filepath
, http-types
, optparse-applicative
, parsec
, roux-server
, text
, time
, wai
, warp
default-language: Haskell2010
executable roux-server
main-is: Main.hs
other-modules: