Skip to content

fix(ai): ordered lists split by prose no longer restart at "1." - #76

Merged
kocaemre merged 1 commit into
developfrom
fix/markdown-ordered-list
Jun 22, 2026
Merged

fix(ai): ordered lists split by prose no longer restart at "1."#76
kocaemre merged 1 commit into
developfrom
fix/markdown-ordered-list

Conversation

@kocaemre

Copy link
Copy Markdown
Owner

Summary

Fixes a Markdown rendering bug in the AI panels: a numbered list interrupted by prose rendered every item as "1.".

The cross-host summary (and any "game plan") puts a Reason: line between numbered steps:

1. Host A — do this
Reason: …
2. Host B — do that
Reason: …

The interleaved prose ended each <ol>, so every step became its own single-item <ol> — and a fresh <ol> restarts at 1, so the UI showed 1. 1. 1.

Fix

Capture each ordered-list item's source number on the block and emit <ol start={N}>, so steps render 1., 2., 3., … even when split by prose. Contiguous lists are unaffected. Adds parser regression tests for the split-by-prose case.

Testing

npm test → 614 passing (adds 2 markdown-parse cases); npm run typecheck, npm run lint:kb, npm run build — all clean.

🤖 Generated with Claude Code

The Markdown renderer broke a numbered list whenever prose appeared between
items — e.g. the cross-host summary puts a "Reason: …" line between each step:

  1. Host A — do this
  Reason: …
  2. Host B — do that
  Reason: …

Each numbered item ended up in its own <ol>, and a fresh <ol> restarts at 1, so
every step rendered "1.". Capture the source number on each ordered-list block
and emit <ol start=N> so the steps render 1., 2., 3., … (contiguous lists are
unaffected). Adds parser regression tests for the split-by-prose case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WDoCrduJx7h9Dv8XaTqrSr
@kocaemre
kocaemre merged commit 5a009aa into develop Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant