The current implementation does not append a final newline character when saving the todo.txt file. This behavior causes issues with the standard todo.txt CLI, which expects a final newline in the todo.txt file. As a result, a new task added by the CLI are appended to the last task instead of being placed on a new line.
Steps to Reproduce:
Save a todo.txt file using the current implementation.
Add a new task using the standard todo.txt CLI.
Notice that the new task is appended to the last task instead of being placed on a new line.
Expected Behavior:
A final newline character is added when the todo.txt file is saved, ensuring compatibility with the standard todo.txt CLI.
The current implementation does not append a final newline character when saving the
todo.txt
file. This behavior causes issues with the standard todo.txt CLI, which expects a final newline in thetodo.txt
file. As a result, a new task added by the CLI are appended to the last task instead of being placed on a new line.Steps to Reproduce:
todo.txt
file using the current implementation.Expected Behavior: A final newline character is added when the
todo.txt
file is saved, ensuring compatibility with the standard todo.txt CLI.Suggested Fix: Modify the writeToFile method to ensure that a final newline character is added when writing the
todo.txt
file here: https://github.com/ransome1/sleek/blob/c3fceeae7664490a80f3c5c7881bade658eca9cf/src/main/modules/File/Write.tsx#L9-L12That would be great. Thanks a lot in advance.
Best regards - Nik