Skip to content

fix(serialize): start an item below its bullet where its first line would read as a break with it - #34

Merged
plimeor merged 1 commit into
mainfrom
claude/project-thread-656ux2
Oct 18, 2026
Merged

plimeor merged 1 commit into
mainfrom
claude/project-thread-656ux2

Conversation

@plimeor

@plimeor plimeor commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Requested by Plimeor · project thread

Before: three nested empty items were written - - - . An item holding a paragraph -- was written - --. Both were written with no diagnostic, and both read back as a thematic break. Settle's random key test found these.

After: the item's content starts on the line after its bullet, so these are written -\n - - and -\n --. They read back as the same items. This applies to the canonical writer and to an edited item written from the source. Parsed documents such as -\n -- and *\n ** now round-trip exactly.

How:

  • starts_below_bullet checks the item's first written line. It moves the content to the next line when that line is padding, or when, after a - or * bullet, the line holds only that char, spaces and tabs.
  • Validation's first_item_starts_below_its_bullet uses the same check on item_content_first_line, which follows only the first-child chain. Validation and the writer agree, and validation stays linear.
  • The source writer renders such an edited item canonically.
  • The validation spec's wording for lists the serializer starts below their bullet now covers this case.
  • The plan is archived at docs/archive/2026-10-18-item-first-line-break/.

Checks run locally: every CI command in CLAUDE.md passes. The review pass compared validation's answer with the writer's actual output over 131k random nested-list shapes and found no disagreement.


Generated by Claude Code

…ould read as a break with it

Three nested empty items were written `- - - ` and an item holding a
paragraph `--` was written `- --`; both read back as a thematic break.
The item's content now starts on the line after its bullet, in the
canonical writer and for an edited item written from the source, and
validation's rule for a list after a paragraph follows the same first line.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kf5KPnmXitGzqA1hs1txs4
@plimeor plimeor self-assigned this Oct 18, 2026
@plimeor
plimeor merged commit add9e03 into main Oct 18, 2026
2 checks passed
@plimeor
plimeor deleted the claude/project-thread-656ux2 branch October 18, 2026 06:03
@github-actions github-actions Bot mentioned this pull request Oct 18, 2026
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.

2 participants