-
-
Couldn't load subscription status.
- Fork 283
Fix parsing to better handle branch/tag/subdir specifiers in complex URLs and paths #4299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
819d0b8 to
804f0a8
Compare
Previously, URLs like `https://github.com/user/repo.git#branch` were not parsed correctly, causing the entire URL including the specifier to be treated as a single URL component. This prevented proper separation of the base URL from branch/tag/subdir specifications. Changes: - Add preprocessing step to handle GitHub URLs with tree/commit paths - Add preprocessing for Git URLs with #branch, @Version, and :subdir specifiers - Fix regex pattern to properly match branch names with hyphens - Add comprehensive tests for all URL formats Fixes #2230 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ere quite dubious
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.
👨
I first tried to have Claude rearrange our regexes to fix #2230 but it had some problems. When I let it do a slightly bigger refactoring it worked well. I think the current iteration reads more clearly as well (and it added many tests for various permutations of inputs).
Fixes #2230
Fixes #2054
Fixes #3157
🤖
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com