Skip to content

Conversation

Iristyle
Copy link
Contributor

Greedy pattern was causing issues in single line scriptblocks
where string interpolation with braces is used

An example of where this applies: 

if ($true) { "${Env:\Foo}" }

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}" }
```
@Iristyle
Copy link
Contributor Author

#5

guillermooo added a commit that referenced this pull request Sep 30, 2012
Make brace matching for 'captures' lazy
@guillermooo guillermooo merged commit 39d7006 into SublimeText:master Sep 30, 2012
VertigoRay added a commit to VertigoRay/PowerShell that referenced this pull request Nov 8, 2012
This fixes Issue SublimeText#4 on Win7 Ent x64 and OS X 10.6.8. Not tested on other systems.

This change ends a curly-bracket-variable by looking for any non-closing curly bracket character assuming there's an ending curly bracket available.

This improves the fix issued in SublimeText#7.  Using the any character (.) causes it (in certain circumstances; I can provide examples if requested) to continue selection indefinitely. The modification that I've made causes the variable to end at the next curly bracket every time.
FichteFoll added a commit that referenced this pull request Nov 14, 2012
39d7006 was intended to fix #4, but it only updated the JSON file which is not recognized by Sublime Text.
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