On 7/9/07, John Gruber <[EMAIL PROTECTED]> wrote:
My plan for lists is to simplify them as follows:
* A list is a series of list items.
* If any of the items in a list are separated by a *single*
blank line, the entire list is in paragraph mode, and the
contents of each item in the list will be wrapped in `<p>`
tags.
* Otherwise, the list is not in paragraph mode and none of the
items' contents get `<p>` tags.
* Two consecutive blank lines ends the current list, no exceptions.
On 7/9/07, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
But tight inner lists should never go into paragraph
mode just because the outer list has.
With AP's modification, I like this a lot.
While we're talking about whitespace in lists, it might be worth
looking at the other axis: indentation. Right now Markdown uses
4-character tab stops to differentiate nesting levels, which can be
pretty confusing at first. It's natural to indent a nested list two
spaces, and it seems to work when you're only one level deep:
- level 1
- level 2
But things break down in weird ways when you try to go deeper with
2-character indentation:
- level 1
- level 2
- level 2
- level 3
- level 3
- level 4
I think it makes sense to get rid of this invisible 4-character grain,
and just consider a list item to be the start of a nested list if it's
indented more than the previous list item. So:
- level 1
- level 2
- level 3
- level 4
- level 5
- level 6
Another problem is that Markdown doesn't degrade gracefully when the
indentation gets wacky:
- level 1
- level 2
- level 3
- level 3
- level 3
To handle bizarre indentation, the rule should probably be that an
outdented list item belongs to the most recent list item that's
indented less. So:
- level 1
- level 2
- level 2
- level 3
- level 1
Still kind of odd, but no more odd than the input.
_______________________________________________
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss