Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: avoid trailing spaces #488

Closed
callegar opened this issue Apr 30, 2023 · 2 comments
Closed

Minor: avoid trailing spaces #488

callegar opened this issue Apr 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@callegar
Copy link

Is it an actual bug?

Yes, minor

Did you check if the bug has already been reported?

Yes

Describe the bug

When adding context or projects using the button, sleek adds a trailing space after the context/project label. When saving the task line in the todo file, if this results in a trailing space at the end of the line, the trailing space should be removed.

The trailing space is not a problem wrt the todo.txt specification. However, one of the advantages of the todo.txt format is that it is purely textual and line based, so diffs can be taken (directly or via a revision control system such as git). Trailing spaces are invisible and if present and then removed end up in spurious diffs, so they'd better be avoided beforehand.

To Reproduce
Steps to reproduce the behavior:

  1. add a task, completing it with a context entry obtained by pressing a context button.
  2. check the saved todo file
  3. note a trailing space at the end of the task line

Do you see any error entries in sleeks developer tools?

N/A

Expected behavior

Would be great if sleek always saved task lines with no trailing spaces

Screenshots

N/A

Desktop (please complete the following information):

  • OS: Manjaro
  • Version of sleek: 1.3.1
  • Source: Flathub
@callegar callegar added the bug Something isn't working label Apr 30, 2023
@ransome1
Copy link
Owner

ransome1 commented May 15, 2023

@callegar could you please check if this still occurs in this pre release? https://github.com/ransome1/sleek/releases/tag/v1.3.2-rc.1

@ransome1 ransome1 reopened this May 15, 2023
@callegar
Copy link
Author

Seems fine, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants