forked from PowerShell/PowerShellEditorServices
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PowerShellGH-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.
- Loading branch information
1 parent
bb65b2a
commit 02273eb
Showing
2 changed files
with
39 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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