Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Hyperlinks to external sites with anchor tags are correctly rendered #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grobenek
Copy link

@grobenek grobenek commented Sep 9, 2024

Summary

This PR fixes an issue where hyperlinks with anchor tags (#) are incorrectly treated as local links. Right now, if a document has an external link with an anchor, it’s being parsed as a local link.

Problem

With the current setup, links to external sites with anchor tags end up looking like local URLs. For instance:

Original Link: https://github.com/VolodymyrBaydalka/docxjs#test_anchor
Incorrectly Parsed Link: http://localhost:9876/debug.html#test_anchor
This messes up the URL, which could cause navigation issues.

Solution

This update fixes the parsing so that external links with anchors are handled correctly. The link will now be preserved as intended.

Original Link: https://github.com/VolodymyrBaydalka/docxjs#test_anchor
Correctly Parsed Link: https://github.com/VolodymyrBaydalka/docxjs#test_anchor

@grobenek grobenek changed the title Fix: Hyperlinks with anchor tags are correctly rendered Fix: Hyperlinks to external sites with anchor tags are correctly rendered Sep 9, 2024
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