fortran-lang / fprettify

auto-formatter for modern fortran source code
https://pypi.python.org/pypi/fprettify
Other
370 stars 76 forks source link

Add function that adds a space after end in an end construct command when parser is True @aradi #86

Closed helmutwecke closed 3 years ago

helmutwecke commented 3 years ago

Hello @pseewald

I added a function that adds a space after the "end" in an end construct command (ex. endif -> end if, enddo -> end do). I also added a parser that en/disables this functionality when it is True/False, with the default False. This functionality was added by request of @aradi who is interested in using fprettify with this new feature.

Best regards, Helmut Wecke

pseewald commented 3 years ago

I prefer to include this behaviour in the existing option whitespace-intrinsics. I will first merge #51, then I take care of this pr. Thanks!

pseewald commented 3 years ago

I properly integrated this feature in fprettify and made it default, I hope this is ok for you (if not please let me know).