list corner case

Albert Skye mistlail at yahoo.co.uk
Tue Sep 9 01:57:59 EDT 2008


The input has differing markers; presumably, the author (user) intended some kind of semantic distinction. This rules out (a). (It could be argued that the author is sloppy/lazy but I think supporting that kind of sloppiness/laziness is deplorable, which is why I deliberately use the word "author" instead of "user").

It may seem preferable to *require* indentation for nesting, but it isn't *necessary* (with only list or inline contents). Markdown syntax presents a strong pattern of using blank lines to separate elements. Presumably, the author intended some kind of semantic significance by joining (not separating) the lines. This rules out (c).

Consider this example:

1. Albert
- flowers
- bicycle

2. Lucy
- food
- water
- wine

The intention seems clear enough: each item in the ordered list has a subordinate unordered list. Further, if the author is using differing markers within an *un*ordered list, it is likely to be semantically significant.

* Albert
- flowers
- bicycle

* Lucy
- food
- water
- wine

I imagine this interpretation may be distasteful to implementers because it means that it is possible to make ugly nested lists. In any case, a syntax defines a state space which almost inevitably supports some ugly states; this does not mean that those states must (or ever will) be present.

Let it (b).


More information about the Markdown-Discuss mailing list