The first test corresponds to the first issue mentioned in #1559, which is definitely a bug. This is addressed by the addition of the new if statement at the end of the while loop. The second test corresponds to my preferred behavior of ignoring empty lines when adjusting indentation levels. This was addressed by the modification of the condition to update the minimum indent level. If you do not believe this should be default behavior, at least an option should be provided, since I'm finding it necessary for my use case.
Fixes #1559
The first test corresponds to the first issue mentioned in #1559, which is definitely a bug. This is addressed by the addition of the new if statement at the end of the while loop. The second test corresponds to my preferred behavior of ignoring empty lines when adjusting indentation levels. This was addressed by the modification of the condition to update the minimum indent level. If you do not believe this should be default behavior, at least an option should be provided, since I'm finding it necessary for my use case.
Please let me know if you have any thoughts.