Message357409
| Author |
terry.reedy |
| Recipients |
rhettinger, taleinat, terry.reedy |
| Date |
2019年11月24日.19:22:53 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1574623374.05.0.544172943663.issue38862@roundup.psfhosted.org> |
| In-reply-to |
| Content |
Currently, iomenu.IOBinding.fixnewlines makes sure that when a non-empty non-Shell file is saved (and possibly run), it ends with at least 1 newline. At one time, I believe, compile needed this, and it is still good practice. (Git diffs note the absence of a final newline.)
I originally planned to incorporate possible newline addition into do_rstrip, in anticipation of calling do_rstrip on save, but I have changed my mind, at least for the present. That code can stay where it is. If someone explicitly runs Strip Trailing Whitespace, adding a newline would sometimes be desired, but would sometimes be unexpected and possibly a nuisance. do_rstrip will ensure that non-Shell files end with at most 1 newline.
My revised intent is that once we strip on save, saved files should be properly formatted for use or merging into a repository. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2019年11月24日 19:22:54 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, taleinat |
| 2019年11月24日 19:22:54 | terry.reedy | set | messageid: <1574623374.05.0.544172943663.issue38862@roundup.psfhosted.org> |
| 2019年11月24日 19:22:54 | terry.reedy | link | issue38862 messages |
| 2019年11月24日 19:22:53 | terry.reedy | create |
|