You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(GH-811) Fix folding for regions with same end token
Previously the token matching was broken;
```
foreach ($1 in $2) { <----- STARTS MATCH HERE (1)
$x = @{ <----- STARTS MATCH HERE (2)
'abc' = 'def'
} <----- ENDS MATCH HERE (1) (2)
}
```
This was caused by two or more different token pairs sharing the same end token.
This commit modifies the token pair matching to take an array of Start Tokens
instead of a single. This has the added benefit of performance increase too.
This commit also adds tests for this scenario.
0 commit comments