A list item holds block elements, not just paragraphs !7

merged merged by cmc on 2026-08-31 23:49 UTC · krz/org-swift:list-blocks into main

Discussion

cmc

#+begin_src inside a list item rendered as literal prose — visible in the iOS README view on any repo whose Contributing section puts commands under numbered steps.

OrgListItem.content was [[OrgObject]], paragraphs only, so the parser folded every non-marker line into the running paragraph. An item's body is now parsed as a document of its own and held as [OrgElement]; the sublist field is gone, a nested list being just a .list in the content.

Paragraphs wrap in <p> only when the item has more than one, matching orgo; blocks follow bare. The SwiftUI path renders item content through OrgBlockListView, the same view the document body uses.

Breaking for anyone constructing an OrgListItem (only the parser and tests do).

Depends on krz/org-conformance!1 for the listblocks case. 89 tests green.