Markdown: ordered lists always render from 1 — <ol start> is dropped
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start in desktop/src/shared/ui/markdown.tsx around lines 1546 and 1545, where the ol and li renderers destructure only children. Reproduce the issue with a message containing 42. answer; done means ordered lists retain their starting number and explicit list-item values are not dropped.
Written by the indexing model from the issue text.
Description
What happens
An ordered list that starts at any number other than 1 renders starting from 1.
A chat message whose entire content is 42. displays as 1. — which is how I hit this: an agent answered a question with 42., and the channel showed 1., so the agent appeared to have given the wrong answer. The stored event content is "42."; only the rendering differs.
Repro
Send a message containing:
42. answer
Expected: 42. answer (CommonMark: an ordered list's first item sets the list's start number)
Actual: 1. answer
Cause
desktop/src/shared/ui/markdown.tsx:1546 destructures only children, so the start prop that react-markdown supplies is dropped:
ol: ({ children }) => (
<ol className={cn("list-decimal", listClassName)}>{children}</ol>
),
With no start attribute, the browser numbers from 1.
li on the line above has the same shape, so an explicit value on a list item is dropped for the same reason:
li: ({ children }) => <li className={listItemClassName}>{children}</li>,
Other components in the same file (for example code at :1439) already spread ...props, so this looks like an oversight rather than a deliberate choice.
Suggested fix
li: ({ children, ...props }) => (
<li {...props} className={listItemClassName}>{children}</li>
),
ol: ({ children, ...props }) => (
<ol {...props} className={cn("list-decimal", listClassName)}>{children}</ol>
),
Environment
react-markdown^10.1.0,remark-gfm^4.0.1
Note
Agents are told to use GitHub-flavored Markdown (crates/buzz-acp/src/base_prompt.md), so any agent replying with a bare numeric answer hits this and looks like it answered incorrectly.
- Dominant language
- Rust
- Stars
- 33.7k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 239
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from block/buzz
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
workflow_sink's mention parser never masks code regions — @name inside a code span wakes the agent Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 Half a day Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·