list corner case

Waylan Limberg waylan at
Mon Sep 8 15:35:26 EDT 2008

On Mon, Sep 8, 2008 at 1:48 PM, <Bowerbird at> wrote:

> waylan said:

>> So, then, how do we interpret "do nothing".


> "nothing" is exactly as john put it in his e-mail:

>> - one

>> 2. two

Well, as any generated output (anything except raw html) should be
valid html, at the least it would be wrapped in some container (could
be a <p> or <div> or something). More realistically, as I understand
how most of the parsers work, I would expect such a drastic
interpretation of "do nothing" to be:

2. two</li>

That is, the second line is simply seen as a continuation (another
line) of the first list item as it does not start with indentation
(indicating nesting) or a matching list item indicator (indicating
another item of the same type). In other words, if the line does not
start with the *same* list item type it is seen as a line of plain
text - no different than:

- foo

We'll call this Option E. I'd argue that this would actually be a
dumber parser than a true "do nothing" solution as the truly "do
nothing" parser would need knowledge of, and code to test for the
special case and act differently (as Yuri points out, that's ugly - I
know I wouldn't want to write the parser for that), whereas option E
just dumbs the parser down a little.

This would also present an interesting solution to the "I want two or
more consecutive, but different lists in my document" problem.

1. one
2. two

* foo
* bar

- blah
- baz

No more of that "must use two blank lines between each list" monkey
business that we've discussed before and no-one has bothered to
implement. Which, btw, is another reason why I like C better than A.

Either C or E works for me, but I'll settle with A as a lousy
compromise seeing it already appears to have the popular vote.

Waylan Limberg
waylan at

More information about the Markdown-Discuss mailing list