Skip to content

Fix duplicate PDF anchor destinations by scoping them to page URLs - #17

Merged
jparris merged 2 commits into
mainfrom
cshekhar/EX-15422/correct-link
Aug 21, 2026
Merged

jparris merged 2 commits into
mainfrom
cshekhar/EX-15422/correct-link

Conversation

@chetan-shekhar

@chetan-shekhar chetan-shekhar commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem:

The PDF exporter treated identical anchor names from different pages as one global destination. When multiple pages contained the same section anchor, links could navigate to the wrong section after the individual PDFs were merged.

For example, a link to #overview on one page could incorrectly open the Overview section from another page.

Changes:

Scope PDF destinations by their source page URL and anchor.
Normalize page URLs before resolving destinations.
Rewrite internal links using the full page URL and anchor.
Resolve direct PDF destination annotations using their source page.
Add regression coverage for duplicate anchors across multiple pages.

Signed-off-by: Chetan Shekhar <cshekhar@ddn.com>
@chetan-shekhar chetan-shekhar self-assigned this Aug 20, 2026
@chetan-shekhar chetan-shekhar added the bug Something isn't working label Aug 20, 2026
@chetan-shekhar
chetan-shekhar marked this pull request as ready for review August 20, 2026 12:51
@chetan-shekhar
chetan-shekhar requested a review from jparris August 20, 2026 12:55
Comment thread src/merge.rs Resolved
@chetan-shekhar
chetan-shekhar requested a review from jparris August 20, 2026 19:56
@jparris
jparris merged commit bfb23d6 into main Aug 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants