Le 2008-09-09 à 21:26, John MacFarlane a écrit :

Against (b):  it's just too unexpected.  Nothing in the markdown
syntax description would lead one to expect that changing the list
marker would start a sublist.  I'm curious, though, to hear whether
Michel Fortin has a rationale for doing it this way in PHP Markdown;
I think he's the only (b)-category implementer who hasn't weighed
in on this discussion.


Bug report posted on this list by Dhruba Bandopadhyay on September 18, 2004:

The markdown text:

* one
* two

1. one
2. two

gives the XHTML:

<ul>
<li>one</li>
<li><p>two</p></li>
<li><p>one</p></li>
<li>two</li>
</ul>


I felt it was worth a fix, so:

> 1.0.1b (6 Jun 2005)
>
> * Fix for an ordered list following an unordered list, and the reverse. There
>     is now a loop in _DoList that does the two separately.

Seems like most implementation still parse the above as one big unordered list though:

<http://babelmark.bobtfish.net/?markdown=*+one%0D%0A*+two%0D%0A%0D%0A1.+one%0D%0A2.+two >

 - - -

That said, about the situation where there is no space between the two lists, I'm not sure why it should be treated differently than with Dhruba's report. If you take the following:

    * one
    * two

    * three
    * four

you only get one list. With my fix, this doesn't change; the only change is that it now stops the list when it can't find another list marker *matching the current list type*, plain and simple.

--
Michel Fortin
[EMAIL PROTECTED]
http://michelf.com/





_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to