Skip to content

Properly reset state after leaving a regex capture#3970

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-20-properly_reset_state_after_leaving_a_regex_capture
Feb 20, 2026
Merged

Properly reset state after leaving a regex capture#3970
graphite-app[bot] merged 1 commit intomainfrom
02-20-properly_reset_state_after_leaving_a_regex_capture

Conversation

@vinistock
Copy link
Copy Markdown
Member

@vinistock vinistock commented Feb 20, 2026

Motivation

We were supposed to set the regexp capture state back to false when leaving the node, not set it to true again. Otherwise, we fail to highlight local variable target nodes that appear after the regex.

Implementation

Just switched to false.

Automated Tests

Added a test that reproduces.

@vinistock vinistock self-assigned this Feb 20, 2026
@vinistock vinistock added the bugfix This PR will fix an existing bug label Feb 20, 2026 — with Graphite App
Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock added the server This pull request should be included in the server gem's release notes label Feb 20, 2026 — with Graphite App
@vinistock vinistock marked this pull request as ready for review February 20, 2026 18:51
@vinistock vinistock requested a review from a team as a code owner February 20, 2026 18:51
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Feb 20, 2026

Merge activity

### Motivation

We were supposed to set the regexp capture state back to false when leaving the node, not set it to true again. Otherwise, we fail to highlight local variable target nodes that appear after the regex.

### Implementation

Just switched to `false`.

### Automated Tests

Added a test that reproduces.
@graphite-app graphite-app bot force-pushed the 02-20-properly_reset_state_after_leaving_a_regex_capture branch from 2b3c328 to 409dea2 Compare February 20, 2026 19:23
@graphite-app graphite-app bot merged commit 409dea2 into main Feb 20, 2026
36 checks passed
@graphite-app graphite-app bot deleted the 02-20-properly_reset_state_after_leaving_a_regex_capture branch February 20, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants