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 parsing of unquoted URLs #409

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

czechboy0
Copy link
Contributor

Summary

I believe this fixes #337, which I also just hit.

The problem is that trying to parse an int succeeded for the unquoted string http://example.com (parsed as the number 0), which caused issues when using an "AnyCodable" approach.

This PR makes the parsing stricter, so that a URL like above does not successfully parse as an int, and allows "AnyCodable" wrappers to only successfully parse the value as a string.

Test Plan

Added a unit test both for the positive and negative cases.

Copy link
Owner

@jpsim jpsim left a comment

Choose a reason for hiding this comment

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

Looks great, thank you so much for the fix!

@jpsim jpsim merged commit 626b33b into jpsim:main Mar 15, 2024
49 checks passed
@czechboy0 czechboy0 deleted the hd-fix-unquoted-url-parsing branch March 15, 2024 16:17
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.

Issue with sexagesimal support
2 participants