diff --git a/src/Roux/CooklangPrint.hs b/src/Roux/CooklangPrint.hs index 4912692..05d1756 100644 --- a/src/Roux/CooklangPrint.hs +++ b/src/Roux/CooklangPrint.hs @@ -85,7 +85,10 @@ renderBody recipe = body = T.intercalate "\n" rendered in if T.null body then Nothing else Just body --- | Render a single section. +{- | Render a single section. +Steps within a section are separated by blank lines, which is how +the Cooklang parser identifies step boundaries. +-} renderSection :: Section -> Text renderSection section = let header = case sectionName section of @@ -93,7 +96,7 @@ renderSection section = Nothing -> T.empty items = toList (sectionBody section) steps = map renderBodyItem items - in header <> T.intercalate "\n" steps + in header <> T.intercalate "\n\n" steps -- | Render a single section body item (step, comment, or note). renderBodyItem :: SectionBodyItem -> Text