Skip to content

fix: keep hyperlink URL when it has a fragment - #1139

Open
nkuprins wants to merge 1 commit into
apache:mainfrom
nkuprins:fix/hyperlink-url-fragment
Open

nkuprins wants to merge 1 commit into
apache:mainfrom
nkuprins:fix/hyperlink-url-fragment

Conversation

@nkuprins

Copy link
Copy Markdown
Contributor

Closed: #1138

Purpose of the pull request

As title.

What's changed?

  • HyperlinkTagHandler resolves the r:id relationship first and appends "#" + location when both are present.
  • The two cases in the handler swap order (the r:id lookup is now case 1), and the Optional chain becomes a plain if, so the diff is larger than the change in behaviour.
  • New test ExtraDataTest#readHyperlinkWithUrlFragment reads extra/extraHyperlinkFragment.xlsx

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

This branch has not been deployed

No deployments
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.

[Bug] Hyperlink with a # part is read back without its target

1 participant