-
Notifications
You must be signed in to change notification settings - Fork 510
orphan endregion disables folding. #1459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@glennsarti for awareness. This is because of these lines of code: 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 |
… region tokens Previously the folding provider would crash with an error if the document contained mismatched begin and end region comments e.g. If the document started with `# endregion`. This was due to the token stack code always assuming there was at least one element in the stack. This commit modifies the end region detection to only trigger if there was a previous begin region.
PR is up with a test for it. |
…kens (#1461) Previously the folding provider would crash with an error if the document contained mismatched begin and end region comments e.g. If the document started with `# endregion`. This was due to the token stack code always assuming there was at least one element in the stack. This commit modifies the end region detection to only trigger if there was a previous begin region.
System Details
$PSVersionTable
:Name Value
PSVersion 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.
The text was updated successfully, but these errors were encountered: