Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #21959.
Catalog.parseDestDictionaryread only the first level of theGoToE/Ttarget dictionary, so a link to a grandchild (/T << /N (green.pdf) /R /C /T << /N (blue.pdf) /R /C >> >>) resolved to the child.The
/Tchain is now followed (guarding against cycles) and the nested names are exposed asattachmentPath;attachmentIdstays the top-level attachment, so existing consumers are unaffected. When a path is present,PDFLinkService.getAttachmentContentopens each embedded PDF in turn and reads the next attachment from it, and the annotation layer opens the last one under its own name. If any/Ris not/Cor a name is missing, the action is treated as unimplemented, as before for the first level.Added
issue21959.pdf(the file from the issue) and an API test checking the child links have no path and the grandchild link has["blue.pdf"].Ran live:
gulp generic+gulp server, headless Chrome onviewer.html?file=/test/pdfs/issue21959.pdf, clicked each link -> left link opensgreen.pdf(title "green"), the right link now opensblue.pdf(title "blue"); before it opened green.Re-ran after rebasing onto current master:
gulp unittestcligives 1743 specs, 10 failures; the same 10 fail on unmodified master (1742 specs), and the new issue 21959 spec passes. eslint is clean on the touched files.