Skip to content

Commit 881c4d3

Browse files
committed
Make brace matching for 'captures' lazy
Greedy pattern was causing issues in single line scriptblocks where string interpolation with braces is used An example of where this applies:  ```powershell if ($true) { "${Env:\Foo}" } ```
1 parent 490d3b4 commit 881c4d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Support/PowershellSyntax.JSON-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
"name": "storage.modifier.scope.powershell"
383383
}
384384
},
385-
"match": "(?i:(\\$)(\\{(?:(private|script|global):)?.+\\}))"
385+
"match": "(?i:(\\$)(\\{(?:(private|script|global):)?.+?\\}))"
386386
}
387387
]
388388
}

0 commit comments

Comments
 (0)