Fix configuration path regex escaping - #14674
Merged
Sean McManus (sean-mcmanus) merged 1 commit intoAug 13, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 12, 2026 23:02
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors how configuration paths are escaped for use in regex-based matching within configuration squiggle handling, aiming to preserve literal matching against the path spelling in the JSON text while reducing the risk of incorrect/double escaping.
Changes:
- Introduces a single-pass helper
escapePathForSquigglesto escape configuration paths for literal regex matching. - Switches
CppPropertiessquiggle path matching inconfigurations.tsto use the new helper. - Adds unit tests covering quotes, repeated backslashes, and regex metacharacters.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Extension/test/unit/escape.test.ts | Adds focused unit coverage for path escaping behavior (quotes, backslashes, regex metacharacters). |
| Extension/src/Utility/Text/escape.ts | Adds escapePathForSquiggles helper implementing the single-pass escaping logic. |
| Extension/src/LanguageServer/configurations.ts | Replaces inline sequential escaping with the shared helper for squiggle path regex construction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sean McManus (sean-mcmanus)
marked this pull request as ready for review
August 12, 2026 23:39
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 13, 2026 14:04
View session
Colen Garoutte-Carson (Colengms)
approved these changes
Aug 13, 2026
Sean McManus (sean-mcmanus)
deleted the
seanmcm/devbox2-wsl/agent39/fix-configuration-path-escaping
branch
August 13, 2026 19:11
Sean McManus (sean-mcmanus)
added a commit
that referenced
this pull request
Aug 13, 2026
…6fde5e50995b33fcddeca0d23e54fb Fix configuration path regex escaping (#14674)
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.
Summary
js/double-escapingandjs/incomplete-sanitizationCodeQL findings together.Validation
203 passing)