Closed ozu945 closed 6 years ago
@glennsarti for awareness.
This is because of these lines of code:
https://github.com/PowerShell/vscode-powershell/blob/master/src/features/Folding.ts#L283-L288
The second if should probably be inside of the first if because we only want to consider the second "if" if we found what we were looking for in the first "if".
This is a trivial change if anyone wants the fame and fortune (ish) of contributing to you favorite extension 😊
Otherwise, we can take care of this as soon as we can.
Should there be tests for this?
Yeah definitely
PR is up with a test for it.
System Details
$PSVersionTable
: Name ValuePSVersion 5.1.14409.1012 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14409.1012 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Issue Description
an orphan #endregion anywhere in the document will disable folding functionality. see exception below.
test case:
Attached Logs
Follow the instructions in the README about capturing and sending logs.