Repository navigation
fix(validate): refuse a block the block before it takes when written - #32
Merged
Merged
Conversation
A tight item writes each block on the line after the one before. A block after a nested list, quote, or footnote ending in a paragraph was read back as that paragraph's lazy line, and one after a table, a blank-line HTML block, a definition, or a quote was read back inside it. Indented code after indented code or a footnote definition was read back inside it in any container. Validation now refuses these shapes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kf5KPnmXitGzqA1hs1txs4
…open, and archive the plan 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:
validate()checked only a block right after a paragraph in a tight item. Take a tight item holding[paragraph a, tight list [b], paragraph c]. It was written as"- a\n - b\n c\n", and when read back,cbecameb's lazy line. Other blocks were absorbed the same way: a block after a quote, alert, or footnote that ends in a paragraph; after a table; after a<div>-style HTML block; after a definition; and a quote after a quote. In any container, the block before also took a later block: indented code after indented code or after a footnote definition, and any block after an HTML block its value leaves open (<!-- c).to_markdownreturned Markdown that read back as a different tree.After: validation refuses these shapes. The diagnostic's path is the later block, so Settle's
save()writes the item's own tight list loose.How:
validate_blockschecks each adjacent pair throughvalidate_taken_block, which replacesvalidate_tight_item. The rule follows the parser's own checks:Only shapes that no source spells are refused, so validation still accepts every document the parser produces. One related shape is left for its own plan, and the spec and the archived plan name it: indented code after a list, where the source marker's width sets the item's content column.
Spec:
validation› Shapes that cannot be written. Plan archived atdocs/archive/2026-10-18-tight-item-lines/.Checks run locally: every CI command in
CLAUDE.md, including the ci-profile tests, docs, the wasm build, and the node tests.Generated by Claude Code