According to the POSIX specification, every line of a text file should be terminated with a newline character, including the last line. Currently, TaskPaper does not insert a newline at end of file; this produces complaints from Git and other commandline tools, as well as erroneously producing a spurious blank line in correctly-formatted files.
The major practical problem this causes is that it becomes invalid to
cat TaskPaper files together, since the last and first lines of adjacent files end up munged together. Since newlines are very significant in TaskPaper format, this is more frustrating than it would be in (say) JSON-encoded files. Besides the
cat problem, this issue is more a matter of principle than anything else.
I am aware that many popular tools and editors incorrectly treat newlines much the same way TaskPaper does currently, so changing TaskPaper’s default behaviour to force a newline might be an inconvenience for users of those applications. With that in mind, would adding a new optional checkbox to enable newline-at-end-of-file in TaskPaper’s Preferences be viable?
In any case, thanks for a great product!