Skip to content

fix: keep deleted blocks in document order - #48

Open
benmandrew wants to merge 1 commit into
sou1118:mainfrom
benmandrew:fix/deleted-block-order
Open

benmandrew wants to merge 1 commit into
sou1118:mainfrom
benmandrew:fix/deleted-block-order

Conversation

@benmandrew

Copy link
Copy Markdown

process_replace emits every unmatched old block before any new block. A deleted display equation after an edited paragraph therefore appears above that paragraph. This reproduces it:

// old
The model is defined below.

$ x = 1 $
// new
The model is defined here.

Each deleted block is now emitted just before the first new block that came after it in the old document. Deleted blocks that nothing follows are still emitted last.

process_replace emitted every unmatched old block before any new block,
so a deleted equation after an edited paragraph appeared above it. Emit
each deleted block just before the first new block that follows it in
the old document.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 23:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eb31b2ca-c1bc-4cb7-9edf-ec35bb56a1db
📥 Commits

Reviewing files that changed from the base of the PR and between a4761cc and d2aeab0.

📒 Files selected for processing: 2
  • src/diff.rs
  • tests/integration.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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