=== BEGIN ARTIFACT FEATURE-List-Items.md === # FEATURE: List Items | Field | Value | |-------------|-------| | Version | 20261014 V1 | | Description | Parse list items with bullet and ordered markers, content-offset indentation rules, empty items, start numbers and lazy continuation. | | Depends On | FEATURE-Setext-Headings.md | | Provides | list item container | | Consumes | block-type registry | ## Questions - None. ## Purpose Implement the List items section of the spec as a registered container block. Grouping items into lists and tight or loose rendering belong to the lists story. ## Rules - A bullet marker is `-`, `+` or `*`. An ordered marker is 1 to 9 digits followed by `.` or `)`. The marker may have up to three spaces of indentation. At least one space or tab must follow the marker unless the item is empty. - Content offset W+N: W is the marker width and N is the number of spaces after it, if that is 1 to 4. If 5 or more spaces follow the marker and the rest of the line is not blank, the item starts with an indented code block and N is 1. If the rest of the line is blank, the item starts with a blank line and N is 1. - Column-aware indentation with tab stop 4 is used throughout. Continuation lines must be indented at least W+N columns relative to the containing block. Blank lines continue the item. - An item can begin with at most one blank line: a second consecutive blank line right after an empty marker ends the item. - Interruption: when a list item would interrupt a paragraph, it must not start with a blank line, and an ordered item must start with number 1. A thematic break line is never a list item. - Laziness: an unindented line that is paragraph continuation text stays in the item's open paragraph. - Ordered items carry a start number (leading zeros allowed). Output is `
  • ` elements; a loose item wraps paragraphs in `

    `. ## Reads - Lines handed to the block engine. ## Writes - List item nodes in the block tree. ## Programmatic Acceptance The corpus section examples need list grouping and tightness, so it is gated in the lists story. The checks here are bounded and avoid tight-list paragraph rendering. === AC items-bullet-items === Intent: Each bullet marker line starts one li element, and consecutive items of one marker form one ul. import subprocess items = ["first", "second", "third"] source = "".join("- " + text + "\n" for text in items) result = subprocess.run(["./commonmark"], input=source, capture_output=True, text=True) print(result.stdout) assert result.returncode == 0 assert result.stdout.count("

  • ") == len(items) assert result.stdout.count("