todotxt / todo.txt

‼️ A complete primer on the whys and hows of todo.txt.
GNU General Public License v3.0
2.33k stars 102 forks source link

Can key-value pairs appear anywhere in the line? #69

Open xsrvmy opened 2 years ago

xsrvmy commented 2 years ago

It's not clear from the spec whether a key-value pair can appear in the middle of the task name like projects and contexts. For example: what happens with the following line:

(A) After 11:00am, go to the bank

Another question that comes up in this case is whether or not keys should be restricted not start with a number

rachmadaniHaryono commented 2 years ago

todo.txt user here

my impression is that key-value tag will be handled by your program

there is no requirement on description section that tag (project, context, and 'special key/value') should appear in the same order like in the example

example on ^1 put project tag in the middle of description section

but i agree this should be stated for more clarification

maybe add to rule 3 or new rule (rule 4)

Another question that comes up in this case is whether or not keys should be restricted not start with a number

i don't recommend it

key-value tag already have limitation ^2 so it should be good enough for now, unless there is problem

clach04 commented 1 year ago

The current SVG https://github.com/todotxt/todo.txt/blob/8d19d67227f0a695303c29159bd7bb5c77a21fdb/description.svg makes clear that key/values can be anywhere in or after the description, but adding to the end is a good convention. I suspect this wasn't present when this issue was opened.

Good catch on the time example. I opened a new ticket #77.

@xsrvmy I recommend closing this issue.