mpcjanssen/simpletask-android

Text in brackets sometime prevents recognition of the following tag

aisbergde opened this issue · 21 comments

try this content

2022-09-25 +test (Text in brackets sometimes prevents recognition of the following tag) +test2 +test3
2022-09-25 +test (Text in brackets with following dot). +test3
2022-09-25 +test (Text in brackets without following dot) +test3

the +test2 is not recognized as tag. I tried to find out the logic, when this happens, but I didn't. I think it doesn't depend on the dot.

you can also remove the +test3 after +test2 and it will not be recognized.

Screenshot_2022-09-25-08-20-10-592_nl.mpcjanssen.simpletask.jpg

as a work around I can add one more space in front of the tag. But I also use the same todo files on Windows (I use a GitLab repository to sync). But the Windows app sleek can't keep the original order of lists and tags and resorts them.

I need to find a way to use Simpletask on Windows.

For me the tags are recognized and higlighted properly: (see below).
Which version are you using? (Find at top of Settings -> Other -> View debug log)

Screenshot_20220925_101142
Screenshot_20220925_101116

Simpletask cloudless v11.0.1

btw, I can't copy and paste content from the log. Please implement a way to easy copy the current version. See (can't find the other issue here on Android, because GitHub is always opening in this terrible mobile app where it is not possible to do anything else in parallel)

as workaround I can add an additional blank before the '+test2', but when I open the todo. txt on Windows in sleek, then unfortunately this program rearranges all content.

Just guessing; check linebreak, carriage return, vbcrlf, EOL whatever on Windows vs. Android/Linux?
If linebreak is NOT recognised, maybe due to wrong settings of the file, two 'separate' tasks may be interpreted as ONE by ST. Where did you create the text file, which machine?

I am on Android. I found this issue today when I copied some content from a forum into simpletask. I created 2 tasks, added a tag using Simpletask. And then I wanted to filter by this tag and only one task got the tag. I found out, that it is somehow related to the parentheses, I could reproduce with one test task, but I don't get the issue on some other test tasks. I can't find the logic. It is something with the parser. But the issue can be reproduced. I can create another file, just copied only the relevant content.

So what I posted is already the extract of some testing.

It could be special characters, which are not visible on Android.

So I will check after synchronize with the PC, if there is something not shown in Android.

I think there is an invisible special character:
when I just copy I can reproduce the issue.
when I then remove the visible space before the +test2 and add it again, then the +test2 is a task.

So it is solved.

But this could happen again, when a user will copy and past content from wherever. Maybe it is possible to implement a function to clean up content and to remove non visible characters?

Hm... Remove? Or replace? If the latter, replace by... What? Single whitespace?
On the other hand, it is IMHO not up to ST cleaning up the mess someone else from far away created 😉, in your case the (unknown) author of the source you copied from.

I can't copy and paste content from the log

You can share from the log, along with something like share to clipboard

As for the issue: the best outcome imo would not be to automatically sanitize, but just warn the user that there is some character which may not be render on Android / might cause parsing issues. The warning can show only on the add task screen, so it isn't too annoying for people who might want to use these characters.

Yes, a warning would be good. Especially when you are on Android, you think that what you see is what it is. So you don't notice such errors. On the PC, there are a few tools that can clean up the content of the clipboard so that only the pure text is copied. On Android, you have to take what's available.

By the way, I haven't found out on the PC what kind of special character might have been hidden there.

I don't think a warning is the right solution, I would like to know what this "space" character is so I can update the expression used to identify tags so it will just work correctly.

I can't upload, but I used a hex editor to check the content

Screenshot_2022-09-27-22-41-44-486_nl mpcjanssen simpletask
Screenshot_2022-09-27-22-41-23-090_com myprog hexedit

c2 a0

@aisbergde thanks for the feedback. Could you try with one of the versions from https://mpcjanssen.nl/artifacts/11.0.1-5-bd94175/ ?

I will do. But it looks like I need to uninstall my current f-droid version first. And there is no backup and restore for settings, so I will do some Screenshots.

Maybe it would be a good idea to enable not only save and restore of filters, but also for settings?

Or I will try to install on another smartphone, where the settings are not so important.

it looks better now, regarding test2

Screenshot_2022-09-28-00-03-33-375_nl.mpcjanssen.simpletask.jpg

Screenshot_2022-09-28-00-16-38-858_com.mi.android.globallauncher.jpg

You can install multiple version of Simpletask without issue. So just try one of the debug builds and you won't have to uninstall the FDroid version.

I can't
Otherwise I would not write that I can't.

Screenshot_2022-09-28-08-03-58-255_com.google.android.packageinstaller.jpg

Screenshot_2022-09-28-08-04-06-639_com.google.android.packageinstaller.jpg

it is in conflict with an existing installation.
I also tried the other applications, but they can't open local files or they are looking for encrypted files.

but it looks like that I can install the debug version in parallel. I did not read carefully
my fault 🤔