Orbeez kit
Conversation

Markdown

<Markdown />
GitHub's markdown set in the kit's type, with fenced code as CodeBlocks.

Three things changed in cart.ts:

  1. The loop bound is i < items.length
  2. Totals are summed in cents, not floats
  3. A test covers the two-item case
ItemsBeforeAfter
112.0012.00
212.0030.00

All 48 tests pass.

Install

bash
npx shadcn@latest add https://orbeez-kit.vercel.app/r/markdown.json

Usage

tsx
<Markdown>{answer}</Markdown>

// while it streams: hold back half-written lines and draw the caret
<Markdown streaming={!done}>{answerSoFar}</Markdown>

Good to know

  • streaming holds back a last line that is only markdown so far, like "- *", which would otherwise parse as a list inside a list and snap back a character later.