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 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 thisref
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
.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
to the beginning of the title and remove the prefix when the PR is ready.