Skip to content

refactor(input): generalize empty-line anchor machinery beyond headings (lists 1/5)#510

Open
wildseansy wants to merge 1 commit into
software-mansion:mainfrom
wildseansy:feat/list-1-anchors
Open

refactor(input): generalize empty-line anchor machinery beyond headings (lists 1/5)#510
wildseansy wants to merge 1 commit into
software-mansion:mainfrom
wildseansy:feat/list-1-anchors

Conversation

@wildseansy

@wildseansy wildseansy commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

The list stack (per the review ask, now including ordered lists — the shared machinery made them cheap to add):

  1. refactor(input): generalize empty-line anchor machinery beyond headings (lists 1/5) #510 — anchor machinery refactor (no behavior change)
  2. feat(input): list block types + marker rendering (lists 2/5) #511 — list block types + marker rendering
  3. feat(input): parse and serialize lists (lists 3/5) #512 — parser + serializer
  4. feat(input): list commands, keyboard editing, and empty-item anchors (lists 4/5) #513 — commands + keyboard + ZWSP/empty anchors
  5. feat(input): list state, toolbar, docs, and e2e (lists 5/5) #514 — state + toolbar + docs + e2e

GitHub can't base a fork PR on another fork branch, so every PR targets main and the diff shown for PR N is cumulative — this PR's own change is its last commit (each stage is exactly one commit on the previous branch). We'll merge bottom-up; after each merge the next PR's diff collapses to just its own commit. Checkout feat/list-5-state to test the full feature end-to-end.

This PR

Introduces BlockType.ANCHORED (Android) and ENRMBlockTypePersistsWhenEmpty (iOS) and routes the block store's adjust/normalize passes, the formatter's zero-length anchor stamping, and the views' orphan-anchor prune through them instead of heading-only checks. Pure refactor — headings are the only anchored type until #511 adds the list types.

Verified: ktlint + compileDebugKotlin green, TS green, example iOS build green (whole stack).

🤖 Generated with Claude Code

Introduces BlockType.ANCHORED (Android) and ENRMBlockTypePersistsWhenEmpty
(iOS) and routes the block store's adjust/normalize passes, the formatter's
zero-length anchor stamping, and the views' orphan-anchor prune through them
instead of heading-only checks. No behavior change — headings are the only
anchored type until the list block type lands on top.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant