todo.txt icon indicating copy to clipboard operation
todo.txt copied to clipboard

Refine definition of extra metadata tags

Open samuelallan72 opened this issue 1 year ago • 7 comments

Fix potential ambiguities or issues with extra metadata:

  1. original rules disallowed colons in value. This is unnecessarily restrictive: everything is whitespace separated, so allowing colons in the value of extra metadata does not introduce any ambiguity in parsing.

This allows extra metadata like key:val:ue to be correctly parsed as the key key and value val:ue.

  1. Make it clear than the value may be empty. This was previously not defined. Allowing an empty value is also syntactically unambiguous, so this should be fine.

This allows an extra metadata entry like key:, where the key is key and the value is an empty string.

  1. Make it clear that the key must not be empty. This was previously not defined. It does not make sense for there to be an extra metadata where the key is an empty string. As such, entries such as : or :something must not be parsed as extra metadata tags (but rather as part of the description text).

samuelallan72 avatar Oct 17 '22 06:10 samuelallan72