feat(parser): attach modifier lines to their item #97

Closed
opened 2026-07-07 09:26:30 +01:00 by TimCane · 0 comments
TimCane commented 2026-07-07 09:26:30 +01:00 (Migrated from github.com)

Parent: #77 (Phase B, capability). Invariants live in the epic.

Attach modifier lines to the item above them.

Anchors

  • Prior-line tracking already exists: ReceiptParser.cs:88-89 (previousText).
  • Item build loop: ReceiptParser.cs:197-209.
  • ParsedItem shape: ParsedReceipt.cs:15 (attach without a contract change).

Steps

  1. Detect modifier lines (+ Bacon, No Onion, Extra Sauce) - amount-less
    lines following an item.
  2. Attach to the preceding item (append to its name for MVP) rather than
    dropping or reading them as items.

Done

  • New fixture with modifier lines.
  • Existing corpus green.
Parent: #77 (Phase B, capability). Invariants live in the epic. Attach modifier lines to the item above them. ## Anchors - Prior-line tracking already exists: `ReceiptParser.cs:88-89` (`previousText`). - Item build loop: `ReceiptParser.cs:197-209`. - `ParsedItem` shape: `ParsedReceipt.cs:15` (attach without a contract change). ## Steps 1. Detect modifier lines (`+ Bacon`, `No Onion`, `Extra Sauce`) - amount-less lines following an item. 2. Attach to the preceding item (append to its name for MVP) rather than dropping or reading them as items. ## Done - [ ] New fixture with modifier lines. - [ ] Existing corpus green.
Sign in to join this conversation.
No description provided.