A numbered list after a bulleted list is drawn as more bullets: the markdown parser joins lists whose markers differ #133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Seen while investigating #130, which leaves it for an issue of its own.
parseListinui/src/lib/markdown.tsadds every list item at the list's indent to the list it is in, whatever its marker. So this answer:is parsed as one bulleted list of three items, and drawn as:
The numbers are lost, and so is the blank line between the two lists.
Where
Two places in
parseListtake an item of any kind:continueschecksBULLET.exec(next) ?? ORDERED.exec(next), so any list marker at the list's indent continues the list.BULLETorORDERED, and joins the current list without its marker being compared with the list's.Every mix does it
In both directions, and with or without a blank line between. Each source below was parsed with
parseMarkdownat5d67ff9:- a, a blank line,1. b- a, then1. b1. a, a blank line,- b2.)- a, then* b1. a, then1) b1. foo,2. bar,3) bazCommonMark (5.3, Lists): two list items are of the same type when their markers are the same bullet character, or numbers with the same delimiter (
.or)). Changing the bullet character or the delimiter, or switching between bullets and numbers, starts a new list. Items of the same type stay one list across blank lines, so- a, a blank line,- bis one list, as it is today.Where it shows
Everything drawn through
parseMarkdown: an agent's answers, live and settled, subagent reports, thoughts, and a gate's evidence. The fake osfd's streaming answer (ui/dev/fakeosfd.py,ANSWER_TEXT, under### The plan) has exactly this shape, so in the agent-view spec's answer1. Add the timer,2. Update the queryand3. Update the panelare drawn as-items of the bulleted list above them.Fix
Key a list on the kind of its first marker: the bullet character, or the delimiter after a number. An item of another kind at the list's indent ends the list and starts a new one. Unit tests for bullets then numbers, numbers then bullets,
-then*, and1.then1): each parses into separate lists, while- a, a blank line,- bstays one list.#130 changes
repairStreamingin the same file and adds a test that walks every prefix of an answer, counting list items as rows. A separate numbered list after a bulleted one adds a blank row between them, so that walk has to pass with this fix too.Shipped in
457f581, deployed on 2026-10-03 at 01:16 (Actions run 96, together with #130, #132 and #134). Archived in81e567fasopenspec/changes/archive/2026-10-03-marker-change-starts-new-list.What changed
parseListkeys a list on the kind of its first marker: the bullet character (-,*or+), or the delimiter after a number (.or)), as CommonMark does (0.31.2, section 5.3). An item with another kind of marker, at the list's indent, ends the list and starts a new one, with or without a blank line between them.3) bazafter2. barstarts at 3.1.,2.and3.one line below them.agent-transcripthas a new requirement, "A change of list marker starts a new list".Tested
ui/src/lib/markdown.test.ts(blocklists) cover bullets then numbers, numbers then bullets,-then*, and1.then1), each with and without a blank line. They also cover the start number, a nested list and the rendered markup. All 7 split cases failed before the fix.- a, a blank line,- bstays one list.ol. The settled plan is aulof four items, then anolof three with decimal markers, 22.4 px (one line) below.agent-view.spec.tspassed 8 of 8.agent-view.spec.ts:202while the machine was loaded. That spec passes by only 2 to 18 characters, with this change or without it, and is now #135.Verified on production
/api/statusreports7b6a101, which contains this change./healthzhas a new boot_id,boot_01M4031RD5W1RT9B98G2MNF1EE.index-DPU8Rmow.jsis byte for byte the bundle a local build of264202dproduces.Left over
- athen1. b(one space in) is still a nested list, where CommonMark starts a new one..arrives, and the agent-view spec fails under load #130