Skip to content

A comment whose words were rewritten marks the block that replaced them - #525

Merged
serenakeyitan merged 1 commit into
mainfrom
fix/moved-anchors-mark-the-rewrite
Sep 10, 2026
Merged

A comment whose words were rewritten marks the block that replaced them#525
serenakeyitan merged 1 commit into
mainfrom
fix/moved-anchors-mark-the-rewrite

Conversation

@serenakeyitan

Copy link
Copy Markdown
Collaborator

Closes #524.

  • findNearContext records the side the words were on (tdocSide).
  • blockForMoved() walks from the surviving context to the first real text on the other side and takes its block (p, li, h1–h6, blockquote, pre, td, …); the content root is never painted.
  • Approximate anchors — hidden or shown — paint that block in tdoc-anchor-moved (light yellow, dashed underline); chrome.css carries the rule.
  • Verified on the local server: v1 comment on "Risks: install time…", v2 rewrites the sentence → the new sentence is painted tdoc-anchor-moved. Pinned in resolved-anchors.test.js. Offline suite green.

🤖 Generated with Claude Code

On the next version the anchor's words are gone — that is the loop
working — and the pin sat beside an unmarked paragraph. The
neighbourhood match now says which side the words were on, and the block
that replaced them gets a light dashed mark, hidden or not; never the
content root.

Closes #524.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Preview

Open this: https://pr-525-tdoc-preview.jyshi1107.workers.dev/ — the homepage, this PR's code
carrying the landing version in this PR's checkout.
Or a document: https://pr-525-tdoc-preview.jyshi1107.workers.dev/d/conway-life/v/2

This link is unique to this PR. New commits update the same URL. It is not tdoc.dev.

Preview has no Durable Object — concurrent comments use the KV fallback. Data expires in 14 days.

@serenakeyitan
serenakeyitan merged commit 4ce6905 into main Sep 10, 2026
5 checks passed
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.

A comment whose words were rewritten leaves its new paragraph unmarked

1 participant