Parent
Confirmed parity gap
Home still uses the stale delimiter resolver: every closer scans backward across every already-consumed or inactive delimiter. Inputs shaped as ("a " x N) + ("a " x N) therefore take Theta(N^2), matching the copied Bun corpus regression in js/bun/md/md-edge-cases.test.ts.
Bun live Rust maintains 18 opener-bottom frontiers keyed by delimiter kind, run length modulo three, and can-open state, plus a path-compressed previous-candidate chain. Dead delimiter prefixes are skipped once and matched interiors are removed from later searches.
Scope
- Port the opener-bottom and previous-candidate algorithm exactly into Home.
- Preserve CommonMark rule-of-three, strikethrough exact-count, active delimiter, and repeated-closer semantics.
- Propagate scratch allocation failure through the existing parser error set rather than silently degrading to quadratic behavior.
- Verify ordinary nested emphasis output and adversarial scaling with a fair size-doubling benchmark.
No input cap, truncation, timeout change, or benchmark exception.