Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

fix: Support delimiters(_-.~) as start or end characters for a segment. #336

Merged
merged 2 commits into from
Feb 4, 2022

Conversation

blakeli0
Copy link
Contributor

@blakeli0 blakeli0 commented Feb 3, 2022

Support delimiters(_-.~) as start or end characters for a segment if the segment does not contain complex resource names.

  • A segment can start with a delimiter, as long as there is no { right after it.
  • A segment can end with a delimiter, as long as there is no } right before it.
  • A segment like .{well}-{known} or {well}-{known}. is invalid.
  • A segment like .well-known, .well-{known} or .-~{well-known} is considered a literal hence is valid

Fixes #335 ☕️

BEGIN_COMMIT_OVERRIDE
fix: Support delimiters(_-.~) as start or end characters for a segment
END_COMMIT_OVERRIDE

…the segment does not contain complex resource names.
@blakeli0 blakeli0 requested a review from a team as a code owner February 3, 2022 23:21
Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

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

LGTM, but please check the seg.length() > 1 check comment first

@blakeli0
Copy link
Contributor Author

blakeli0 commented Feb 4, 2022

LGTM, but please check the seg.length() > 1 check comment first

Thanks, I see what you mean now, sorry I misunderstood you earlier. On the other hand, I think the way it is now might be better since it's cleaner and easier to read. Moving seg.length() > 1 would only benefit if the segment contains one character which I think is a very rare case.

@blakeli0 blakeli0 merged commit 309521b into main Feb 4, 2022
@blakeli0 blakeli0 deleted the support-dot-as-beginning-character branch February 4, 2022 19:00
@blakeli0 blakeli0 changed the title Support delimiters(_-.~) as start or end characters for a segment. fix: Support delimiters(_-.~) as start or end characters for a segment. Feb 4, 2022
@Neenu1995 Neenu1995 added the release-please:force-run To run release-please label Feb 7, 2022
@release-please release-please bot removed the release-please:force-run To run release-please label Feb 7, 2022
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.

support . a beginning character in path template
5 participants