fix: allow all correct URLs to be formatted #2328
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Quill editor has a rule named
AutoFormatMultipleLinksRule
that auto format HTTP(s) links, however there was a small caveat where path was mandatory if characters others than A-Z were used.The problem is that the URL can contain fragments and query params without requiring an extra
/
as per RFC 3986 on URL structure:Examples of what the rule was handling before the fix:
Proposed PR allows query params and fragments to be used even without a
/
character beforehand, thus respecting what the RFC is stating.Also, I removed the non-prefixed URL from the comments because as opposed to what what was said, it didn't work: