Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks for sharing your notes. Nesting of items is not supported, although the idea has come up. It’s on hold right now – that’s mostly due to practical reasons, because it’s relatively hard to implement in tooling.

Allow me to clarify a few details regarding the spec:

- There can’t be any character before the checkbox. (An item “MUST start at the beginning of a line with a checkbox.”)

- A blank line is defined as “a line that is either empty, or that exclusively consists of blank characters”, and a blank character is defined as “a character from the Unicode Space Separator category (Zs)”. So the description text of an item (that can span multiple lines) cannot contain a line that’s all blank. Reason is that a blank or empty line separates item groups from each other, so allowing it to appear within descriptions could create visual ambiguity. (Even though it wouldn’t be ambiguous from a purely formal standpoint.)

- The format for dates is a subset of ISO-8601, except for the slashed variant (2020/12/31) that’s there for convenience, and the notation for quarters (2022-Q1).



It would be simpler to just use the ISO date format. Otherwise people have to implement their own date parser for your stricter format, which adds code (and therefore bugs) and increases probability that people will incorrectly implement the spec.

Why wouldn't you allow space before the checkbox? If somebody accidentally has a space because it's not obvious in their editor (esp. if items can be separated by two newlines) what happens? Undefined behavior? Your format looks a lot like Markdown so I wouldn't have assumed this was a spec requirement unless I looked closely (most people don't look at specs closely)


> It would be simpler to just use the ISO date format.

[x]it! is supposed to be edited (editable) by hand, and from an end-user perspective, I personally find ISO-8601 in its entirety relatively complex to grasp. The currently supported date formats aim to be a tradeoff between “flexible enough” but “not too complex yet”.

> Why wouldn't you allow space before the checkbox?

To enforce a tidy layout of the file. Whitespace before the checkbox (i.e. on the same line) is undefined behaviour. The idea is that editor plugins help users with compliance of the rules. For example, I think that all available [x]it! editor plugins would highlight it if there was illegal whitespace in front of a checkbox.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: