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

Changed LinkAttribution to allow invalid (unchecked) URLs (Resolves #1927) #1943

Merged
merged 2 commits into from May 8, 2024

Conversation

matthew-carroll
Copy link
Contributor

Changed LinkAttribution to allow invalid (unchecked) URLs (Resolves #1927)

The LinkAttribution's url property is now a String instead of a Uri, so that LinkAttributions can hold invalid URLs.

For easy Uri access, I added a uri property, which parses the url when it's accessed. This is a convenience so that users don't have to explicitly parse a Uri all over the place.

FYI: The motivation for this change is that an existing document, possibly from another source, is parsed and loaded into SuperEditor. This process fails for a document that happens to contain links for invalid URLs.

@matthew-carroll
Copy link
Contributor Author

@roughike please let me know if this covers what you need.

Copy link
Collaborator

@angelosilvestre angelosilvestre left a comment

Choose a reason for hiding this comment

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

LGTM

@matthew-carroll
Copy link
Contributor Author

@roughike - checking again on this. Can you let me know if this change provides what you need?

@matthew-carroll
Copy link
Contributor Author

@miguelcmedeiros @brian-superlist - Can one of you follow up with @roughike on this?

Copy link
Contributor

@roughike roughike left a comment

Choose a reason for hiding this comment

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

Yup, this is exactly what is needed. Thanks!

@matthew-carroll matthew-carroll merged commit d506c69 into main May 8, 2024
11 checks passed
@matthew-carroll matthew-carroll deleted the 1927_allow-invalid-urls-in-link-attributions branch May 8, 2024 06:24
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.

Can't create LinkAttributions with invalid URLs
3 participants