If there is a trailing empty line in a deeper level (say: 4), TP removes tabs from that line when opening the document. Checking the closed document with BBEdit shows the tabs still in place.
The indention is that I don’t want empty lines to effect outline structure in saved documents, because visually it’s impossible to see an empty lines indentation level (when viewed outside of TaskPaper). So when TaskPaper loads a file it corrects for this… any empty line that would be (by indentation level) the parent of a non-empty line is indented so that it doesn’t become a parent.
Previously I was doing this by:
Gather range of empty lines.
Set indent of all those lines to indent of next non-empty line.
Now I instead only change the indentation level of those empty lines if they are indented less then indent level of next non-empty line.
I’m not sure how clear that all was, but please try out the latest preview release. I think the fixed your use case.