Skip to content
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

Fix edge case of UseConsistentIndentation where child pipeline is on the same line as hashtable #1838

Merged
merged 3 commits into from
Sep 22, 2022

Conversation

bergmeister
Copy link
Collaborator

PR Summary

Fixes #1832

During debugging I found that the root cause of the issue was that in MatchingPipelineAstEnd function, the wrong pipeline was being matched (it was the child and not parent pipeline), which lead to de-indentation to be skipped and ending up with one indentation level too much. Therefore removing this ref counter, which is a premature optimisation I have to admit to avoid looping over all pipeline asts every time and can be removed.

PR Checklist

@bergmeister bergmeister marked this pull request as ready for review September 6, 2022 16:10
@JamesWTruher JamesWTruher merged commit e650b46 into PowerShell:master Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pipeline formatting is broken with Select-Object and custom property with nested pipeline
2 participants