See the attached file.
Put cursor at end of line 9, hit ENTER.
Good.
Put cursor at end of line 10, hit ENTER.
BAD: Indented when it should not be.
Lines 10 to 18 and 24 have this problem.
Put a "#" at the end of line 10, and then line 10 doesn't have this problem, but the remaining lines still do.