Skip to content

fix: keep deleted equations out of the numbering - #49

Open
benmandrew wants to merge 1 commit into
sou1118:mainfrom
benmandrew:fix/deleted-equation-numbering
Open

benmandrew wants to merge 1 commit into
sou1118:mainfrom
benmandrew:fix/deleted-equation-numbering

Conversation

@benmandrew

Copy link
Copy Markdown

A deleted display equation is wrapped in #diff-deleted[...] but still takes an equation number. Every later number moves up by one, so the diff no longer matches the new document. In this example, @eq-z reads "Equation 2" in the diff and "Equation 1" in the new document:

#set math.equation(numbering: "(1)")
$ y $          // deleted in the new version
$ z $ <eq-z>
See @eq-z.

A deleted equation now renders as #diff-deleted[#set math.equation(numbering: none)\n$ y $]. The set rule applies only inside the wrapper, so no other equation is affected.

A deleted display equation is still numbered, so every later equation
number shifts by one and no longer matches the new document. Set the
deleted equation with numbering: none, inside its #diff-deleted wrapper
so the set rule does not leak.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 23:31

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 56 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: aba5f140-e878-498c-a358-d3c00bd8b16d
📥 Commits

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

📒 Files selected for processing: 2
  • src/render.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