From 66bb497aca5c5b3a500b382b42e8aa784f8fc8c7 Mon Sep 17 00:00:00 2001 From: alexion Date: Tue, 14 Jul 2026 19:50:44 -0400 Subject: [PATCH] test: enrich fixtures with full OFM feature coverage Expand fixtures/basic.md beyond prose-only annotations to exercise the OFM features the parser must model: unordered and ordered lists, emphasis and strong, a code span, a fenced code block (proving annotations inside code are ignored), a thematic break, and a transclusion. Also adds an empty-braces ingredient (@black pepper{}). Add fixtures/combined.md, a Combined Recipe demonstrating Step References in both sectioned (#Batter:1) and headingless (#2) forms, which do not fit cleanly into a standalone recipe file. --- fixtures/basic.md | 30 ++++++++++++++++++++++++------ fixtures/combined.md | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 fixtures/combined.md diff --git a/fixtures/basic.md b/fixtures/basic.md index b74d899..bf8cee5 100644 --- a/fixtures/basic.md +++ b/fixtures/basic.md @@ -7,21 +7,39 @@ source: https://example.com/pancakes # Classic Pancakes -A simple weekend breakfast that comes together in minutes. +A *simple* weekend breakfast that comes together in **minutes**. Pairs well with [[maple syrup]] or fresh fruit from the [[farmers market]]. +Before you start, gather your equipment: + +- a $mixing bowl{} +- a $non-stick frying pan{} +- a $ladle{} + ## Batter Sift @flour{200 g} and @baking powder{1 tsp} into a $mixing bowl{} along with @salt{0.5 tsp}. Make a well in the centre and crack in @eggs{2}. Gradually whisk in @milk{300 ml} until you have a smooth, lump-free batter. Melt @unsalted butter{30 g} in a $non-stick frying pan{}, then stir most of it into the batter, reserving a little for the pan. +Season with a pinch of @black pepper{} if you like a savoury edge. ### Cooking -Set the $non-stick frying pan{} over a medium-high flame and let it heat for ~1 min. -Pour in a ladleful of batter using the $ladle{} and swirl to coat the base. -Cook for ~2-3 mins until bubbles appear across the surface, then flip and cook for ~1 min more. -Transfer to a $plate{3} and keep warm in a low oven while you repeat with the remaining batter. +1. Set the $non-stick frying pan{} over a medium-high flame and let it heat for ~1 min. +2. Pour in a ladleful of batter using the $ladle{} and swirl to coat the base. +3. Cook for ~2-3 mins until bubbles appear across the surface, then flip and cook for ~1 min more. +4. Transfer to a $plate{3} and keep warm in a low oven while you repeat with the remaining batter. -Serve immediately. +Serve immediately, embedding a drizzle of ![[maple syrup]] straight from its own recipe. + +--- + +## Notes + +Annotations are just prose, so `@flour{200 g}` reads fine even inside a code span. +Text inside a fenced code block is never parsed as an annotation and stays literal: + +```text +@not an ingredient{} $not cookware{} ~5 mins +``` diff --git a/fixtures/combined.md b/fixtures/combined.md new file mode 100644 index 0000000..4b72b13 --- /dev/null +++ b/fixtures/combined.md @@ -0,0 +1,23 @@ +--- +title: Weekend Brunch +tags: [combined] +--- + +# Weekend Brunch + +A Combined Recipe that sequences steps from other Recipe Files. +It has no ingredients or timers of its own — those belong to the referenced recipes. + +## Prepare the batter + +![[basic#Batter:1]] +![[basic#Batter:2]] + +## Cook and plate + +![[basic#Cooking:1]] +![[basic#Cooking:3]] + +## Finish + +![[maple syrup#2]]