Skip to content

Limit escape handling to wildcard case only (\**)#51

Merged
NassimBtk merged 2 commits intofeature/issue-48-support-iterating-over-object-children-using-wildcardfrom
copilot/sub-pr-49-again
Mar 20, 2026
Merged

Limit escape handling to wildcard case only (\**)#51
NassimBtk merged 2 commits intofeature/issue-48-support-iterating-over-object-children-using-wildcardfrom
copilot/sub-pr-49-again

Conversation

Copy link

Copilot AI commented Mar 19, 2026

The escape handling was stripping a leading backslash from any path segment starting with \, not just the \* wildcard-escape case. This was a backwards-incompatible change that broke references to JSON keys whose first character is literally \.

Change

  • Replace pathElement.startsWith("\\") with an exact match on "\\*", so only the escaped wildcard sequence \* is treated specially and resolved to the literal property name *.
// Before: any \-prefixed segment had its backslash stripped
if (pathElement.startsWith("\\")) {
    pathElement = pathElement.substring(1);
    isWildcard = false;
}

// After: only \* is treated as an escaped wildcard
if ("\\*".equals(pathElement)) {
    pathElement = "*";
    isWildcard = false;
}

All other path segments, including those with a literal leading \, are left untouched.


⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Co-authored-by: NassimBtk <14110109+NassimBtk@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 19, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkstyle.org
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-3f672d5de33c41b7/dbs/java/working/files-to-index8379757725709974429.list --sourceArchiveDir=/tmp/codeql-scratch-3f672d5de33c41b7/dbs/java/src --outputDir=/tmp/codeql-scratch-3f672d5de33c41b7/dbs/java/trap/java (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] [WIP] Address feedback on wildcard iterations support in PR #49 Limit escape handling to wildcard case only (\**) Mar 19, 2026
Copilot AI requested a review from NassimBtk March 19, 2026 20:48
@NassimBtk NassimBtk marked this pull request as ready for review March 20, 2026 09:51
@NassimBtk NassimBtk merged commit f4541e1 into feature/issue-48-support-iterating-over-object-children-using-wildcard Mar 20, 2026
@NassimBtk NassimBtk deleted the copilot/sub-pr-49-again branch March 20, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants