fix: 🚑 pattern with globstar and star fails to match #11
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.
This aims to address some of the issues reported in #9.
The cases reported there now work, although there are still scenarios not covered by this fix (but, well, they're failing right now too, so I guess some is better than nothing).
I must be honest and admit that if I were to explain why this change resolves some of the reported cases, I would struggle. It made sense when I was deep in ninja mode, debugging the code and tinkering with things, but after spending a day trying to grasp the entire algorithm, I still can't quite wrap my head around it. The state transitions were perhaps too much for my modest brain, haha... So, while all tests are passing on my end, including the new ones, this would benefit from a thorough review, just to be sure.
Here are some of the cases that were failing before this change and are now passing:
And here are some cases that were failing before this change and would continue to fail afterward: