Repository navigation
fix(serialize): start an item below its bullet where its first line would read as a break with it - #34
Merged
Conversation
…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
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_bulletchecks 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.first_item_starts_below_its_bulletuses the same check onitem_content_first_line, which follows only the first-child chain. Validation and the writer agree, and validation stays linear.validationspec's wording for lists the serializer starts below their bullet now covers this case.docs/archive/2026-10-18-item-first-line-break/.Checks run locally: every CI command in
CLAUDE.mdpasses. 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