ransome1 / sleek

todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)
https://github.com/ransome1/sleek/wiki
MIT License
1.34k stars 104 forks source link

Special character prevents parsing of project and context tags #463

Closed kettenfett closed 7 months ago

kettenfett commented 1 year ago

Project and context tags are not parsed correctly in this instance (see image). i also tried @lop. Still not recognized.

grafik

when I click the task, I noticed, there is a square symbol, that i didn't write, but was probably copy&pasted from MS excel: [..]due:2023-02-28+lop

This character  is preventing the parsing of tags. Parsing works, when I remove it. The character is actually a delimiter of some kind. (it shows up as "DLE" in Notepad++ with "View all characters on")

Can you filter out this character or improve parsing tags when it shows up in front of the '+' or '@' ?

grafik

edit: i just noticed it also prevents the parsing of the due date.

ransome1 commented 1 year ago

I'm not sure if it is a good idea to filter out characters based on a single use case. What is a problematic character to you, might be very relevant to others.

The todo.txt rules state that in order to parse a context for instance it must be prepend by a space and the @ sign. So I'm afraid it's probably your duty to get those characters out of the file.

Have you tried using this file in other todo.txt apps? I'm curious if those are capable of filtering this character.

kettenfett commented 1 year ago

@ransome1 I now realised, the appearance of the symbol doesn't have anything to do with inserting text from other programs. It's actually inserted by sleek itself, whenever the task is expanded with grafik and in this expanded view the ENTER key is is used to create newlines.

For every ENTER one square symbol is inserted. They then become visible when saving or going back to non-expanded viewmode. grafik

grafik

This then causes the failed parsing of tags:

grafik

This is 100% in sleek, no text inserted from anywhere, just typed.

ransome1 commented 1 year ago

You're right these characters are added by sleek. It's actually how the text area feature has been requested a while ago. sleek needs to have some information in the text file line in order to restore the lines in the text area.

Without these characters you would create a multi line todo and the next time you open it, the todo would be back to single line again. That invisible character tells sleek where it needs to break the line in the text area.

I wouldn't know how to solve this without removing the feature :/ If you have an idea, let me know.

ransome1 commented 10 months ago

With the new implementation this method has not changed. We still need a delimiter saved in the line in order to restore the line breaks in the multi line text field.

However a couple of things have been implemented differently. Feel free to just try it out. Maybe it resolves the issue for you: https://github.com/ransome1/sleek/releases/tag/v2.0.0-dev17

I'm collecting feedback for this feature here: https://github.com/ransome1/sleek/discussions/551

github-actions[bot] commented 7 months ago

This is an automated response. We acknowledge your report, and we appreciate your engagement. However, as there has been no recent activity in this thread, it has been marked as stale. If you have any further feedback or if the matter is still relevant, please do not hesitate to respond. Otherwise, this thread will be automatically closed in 15 days from now.