I don’t know if anyone else has this problem:
I occasionally accidentally put whitespace (tabs spaces) on what would otherwise be blank lines (I think this happens by default when you press enter but don’t create a task). This makes folding messier because it folds in the ‘blank’ line into the project, removing the gap between projects.
Before:
Folded (no gap between projects)
A shell one-liner to fix this is:
gawk -i inplace '/^(\s+)?$/ {printf "\n"} /[a-zA-Z0-9]/ {print}' <path>
The first regex ^(\s+)?$
prints out a newline for any line that has only whitespace or nothing. The other prints out whatever it encounters.
Thought that this might help someone.