Closed gagern closed 9 years ago
Hi, @gagern. Thanks for your feedback. I tried to follow the todo.txt format to the letter, though we all make mistakes. I'll respond to each of your points in turn.
This is due to my interpretation of the todo.txt spec that you linked to. I interpret the "Complete Tasks: 2 Format Rules" section of the format spec to mean that both Rule 1 (lowercase x) and Rule 2 (completion date) must be met for a task to be considered complete. There is language in those sections that supports this interpretation:
Upon a really close reading, it looks like the spec can be interpreted differently. That, and the spec has changed over time, including several times since I first coded TodoTxtMac. It's a moving target. I am pretty comfortable with my interpretation of the spec as it stands at this time, however.
It sounds like you're suggesting that \s is too lenient and will match non-space whitespace characters. You are correct, and that might warrant a change. I don't think interoperability will be affected too much either way. At least within TodoTxtMac, it would be atypical for users to be able to enter line breaks or tabs (or other whitespace characters) into the task (the editor makes that sort of thing hard to do). I may experiment with replacing \s in the regular expressions with a " " or "[ ]".
I agree now that the completion date is likely a strict requirement. Sorry, been to hasty in my first read.
No problem. I will consider your second item for a future improvement. I don't think there is much of a risk of interoperability problems, so I'm not going to make a change right away.
Your parsing of the file format doesn't follow the todo.txt specs:
CompletedPattern
should make the date (and one space) optional.\s
where the spec requires a space. This might break interoperability.