jmanuel1 / todoer

Automatically add an email to your local todo.txt when you star it.
MIT License
4 stars 1 forks source link

Escape '+' and '@' in thread subjects when they are turned into todo descriptions #4

Closed jmanuel1 closed 4 years ago

jmanuel1 commented 4 years ago

A problematic example:

2020-05-08 Invitation: Google Chat :) (Jason Manuel) @ Mon May 11, 2020 3:10pm - 3:30pm (MST) email/id:t_8 @email

Here, the subject of the corresponding thread contained an @, which the jsTodoTxt library will parse as an empty context.

Todoer should escape @ and + to remove the possible ambiguity. This can be done by placing a non-space character before each @ or +, or by removing them entirely.

Relevant section of the todo.txt spec: Rule 3: Contexts and Projects may appear anywhere in the line after priority/prepended date.