Fix container names with hyphens#17628
Merged
philipp-spiess merged 4 commits intotailwindlabs:mainfrom Apr 11, 2025
Merged
Conversation
Comment on lines
+781
to
+785
| // Try '@' variant after permutations. This allows things like `@max` of `@max-foo-bar` | ||
| // to match before looking for `@`. | ||
| if (input[0] === '@' && exists('@')) { | ||
| yield ['@', input.slice(1)] | ||
| } |
Contributor
There was a problem hiding this comment.
I've been thinking of restructuring this somehow so that there's only one special-case for @. Let me know what you think about this (I pushed onto your PR). Tests seem to pass so it should be fine? 🤞
Collaborator
Author
There was a problem hiding this comment.
Yes, I was thinking that there would probably be some way to have only one code path for @ 👍
Co-authored-by: Philipp Spiess <hello@philippspiess.com>
philipp-spiess
approved these changes
Apr 11, 2025
Contributor
|
Great stuff, ty! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #17614.
Candidate parsing for variants only account for the root
@if there no hyphens. It seems like the current logic assumes if it does have a hyphen, then it would be one of@minor@max. However, with:Then
@foo-barshould be valid. However, we only check for@foo-barand@fooas roots, but never@. This PR adds a check for@at the very end after iterating through root permutations.