Skip to content

fix(doc): update caption references when copying node items#553

Open
qianchongyang wants to merge 1 commit intodocling-project:mainfrom
qianchongyang:fix/2298-caption-reference-update
Open

fix(doc): update caption references when copying node items#553
qianchongyang wants to merge 1 commit intodocling-project:mainfrom
qianchongyang:fix/2298-caption-reference-update

Conversation

@qianchongyang
Copy link
Copy Markdown

When add_node_items or insert_node_items copies items from one document to another, the caption, reference, and footnote references were not being updated to point to the new document's items. This caused captions to reference stale indices from the source document.

This fix tracks the old->new index mapping as items are copied and uses the existing _update_refitems_with_lookup method to update all references after copying.

Fixes: #2298

When add_node_items or insert_node_items copies items from one document
to another, the caption, reference, and footnote references were not being
updated to point to the new document's items. This caused captions to
reference stale indices from the source document.

This fix tracks the old->new index mapping as items are copied and uses
the existing _update_refitems_with_lookup method to update all references
after copying.

Fixes: #2298
@github-actions
Copy link
Copy Markdown
Contributor

DCO Check Failed

Hi @qianchongyang, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for OpenClaw Agent <agent@openclaw.local>

I, OpenClaw Agent <agent@openclaw.local>, hereby add my Signed-off-by to this commit: 69bc05278ef415347be4423b342dcb15efc68971"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 17, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

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