Ordered list syntax.

Jason Clark jason at jclark.org
Fri Mar 26 21:36:29 EST 2004

On Mar 26, 2004, at 7:45 PM, Michel Fortin wrote:

>> 1.  To make it hard to accidentally trigger a list.
>> 2.  To make it possible to create a single-item list.
> I would just say that I often use single item lists. In many contexts, 
> this kind of list is not rare. On my software pages for [Black 
> Light][1] and [Gamma Control][2] the version history contains one-item 
> lists. In fact, on both pages there is a total of three (one is a 
> sublist). They are unordered lists, so it would be difficult to 
> trigger accidentally one because of text wrapping.
There seems to be several people citing needs for single item <ol>s.  I 
retract my earlier question :-)

> Here are some test cases:
>     This is a paragraph containing the number
>     1. This is the second phrase of the paragraph.
>     This is a paragraph containing the number
>     1. The second sentence contains number
>     2. But it's still the same paragraph.
>     This is a paragraph containing no number.
>     1. This is a single item list.
>     This is a paragraph containing the number
>     1. The second sentence contains no number.
>     1. This is the first item of a list.
> How do you make sure what is a list and what is not in all these 
> examples? Easy, just write the rule that way: "A list must be 
> separated from the previous paragraph by a period or a colon at the 
> end of the previous line, or by a blank line". What do you think of 
> this rule?

These are good test cases.  By the time I'd reached the end of the 
examples, I had concluded that a blank line should precede all lists to 
disambiguate them... but of course this may not behave as most people 
expect, most of the time.  Adding the period and colon caveats should 
address most cases where a list is desired - at least in English.  I do 
not know if other languages use other idioms.  My only concern would be 
indented lists following a colon could be misconstrued as code, but 
since John is considering removing the colon requirement for code 
blocks, I don't think this should be considered a problem.

Jason Clark <jason at jclark.org>

More information about the Markdown-discuss mailing list