Skip to content

Add relative URL conversion. - #17

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
relative-url-references
Aug 14, 2026
Merged

Add relative URL conversion.#17
samuel-williams-shopify merged 1 commit into
mainfrom
relative-url-references

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Summary

  • Add Protocol::URL::Relative#relative_to to express root-relative URLs relative to a URL or path.
  • Preserve query strings, fragments, and encoded path segments.
  • Return already-relative references unchanged.
  • Keep absolute URLs unchanged because relativizing them requires origin comparison.

Verification

  • bundle exec sus: 377 passed, 554 assertions.
  • bundle exec rubocop lib test: 20 files inspected, no offenses.

@samuel-williams-shopify
samuel-williams-shopify merged commit 0b20bf6 into main Aug 14, 2026
40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the relative-url-references branch August 14, 2026 07:26
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