-
-
Notifications
You must be signed in to change notification settings - Fork 26
Parse capture groups in if-blocks. Fixes #50. #51
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
base: master
Are you sure you want to change the base?
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for parsing capture groups in nginx if-blocks by implementing variable extraction from regex patterns. This enhancement fixes issue #50 by enabling proper handling of regex capture groups that can be referenced within if-blocks.
- Modifies IfBlock class to provide variables from regex capture groups
- Adds regex detection and variable extraction functionality
- Updates test expectations to reflect new variable provision behavior
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| gixy/directives/block.py | Implements variable extraction logic for if-blocks with regex patterns |
| tests/directives/test_block.py | Updates test assertion to expect variable provision in if-blocks |
| tests/plugins/simply/http_splitting/if_block.conf | Adds test case for if-block with capture group using $uri |
| tests/plugins/simply/http_splitting/if_block_fp.conf | Adds test case for if-block with capture group using $request_uri |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
fixed the merge conflict |
|



No description provided.