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

Address 3820 #3825

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Address 3820 #3825

merged 1 commit into from
Aug 30, 2024

Conversation

JorjMcKie
Copy link
Collaborator

When creating link destinations from a PDF's names dictionary as created by .resolve_names(), we incorrectly use strings with %-escaped spaces (and other characters) as keys to find dictionary values. This change revert %-escaped names to the original. E.g. every "%20" sub-string is converted to a space, etc.

Copy link
Collaborator

@julian-smith-artifex-com julian-smith-artifex-com left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, except that tests/test_flake8.py::test_flake8 is failing:

/project/src/__init__.py:6851:9: E303 too many blank lines (2)
1     E303 too many blank lines (2)

Could you fix that and update the PR?

When creating link destinations from a PDF's names dictionary as created by `.resolve_names()`, we incorrectly use strings with %-escaped spaces (and other characters) as keys to find dictionary values.
This change revert %-escaped names to the original. E.g. every "%20" sub-string is converted to a space, etc.
@JorjMcKie JorjMcKie merged commit 877d7e5 into main Aug 30, 2024
2 checks passed
@JorjMcKie JorjMcKie deleted the address-3820 branch August 30, 2024 11:04
@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants