Re: Formal Grammar — some thoughts

Michel Fortin michel.fortin at
Tue Aug 1 22:35:03 EDT 2006

Le 1 août 2006 à 20:45, Allan Odgaard a écrit :

> On 2/8/2006, at 1:44, Michel Fortin wrote:


>> [...] For an item to contain block-level content


> I assume this rule applies only to *list* items? Given that e.g.

> block quoted text does not show the problem I demonstrated.

Indeed, it applies solely to list items (and somewhat similarly to
definition list items in PHP Markdown Extra).

>> it must be separated by a blank line from the previous or the next

>> item (it must not be the sole item in the list), or it must

>> contain one or more blank line.


> Okay, so the following should not start block quoting (which it does):


> * bla bla

> > bla bla


> Is the rule defined somewhere? and if so, what is the rationale?

Good question. This has not been documented if I'm correct. It is
only *defined* in Markdown's code that no blank line means span-level
content... which means that the rationale could very well be that it
never got taken care of.

> I find the need for additional lines around list items irritating

> because then that list item will get wrapped in `<p>…</p>` making

> it visually stand out. A common problem when working with nested

> block level constructs (including just nested lists.)

Usually, when I write lists, all of my items have either span-level
content (+ sublists) or block-level content, not a mix of items in
the two modes.

I think I'm simply failing to see the problem you have to solve.
Could I ask for a concrete example of what you want?

> Also, I take it that a list item not wrapped in `<p>…</p>` or

> containing block level constructs is itself not considered a block

> level thing, seeing how nested lists defy your rule.

Yes, nested lists *are* an exception. If you want the exact reason it
was made like that, only John can give a definitive answer, but I'd
suggest that it's because sublists are something useful and pretty
commonly used that way in HTML.

Michel Fortin
michel.fortin at

More information about the Markdown-Discuss mailing list