Sean M Burke <[EMAIL PROTECTED]> writes:
> At 02:43 PM 2003-08-21 -0700, Michael G Schwern wrote:

>> One set of failures is because it doesn't recognize that item lists can
>> start with 0.  More generally the problem is not all numbered item
>> lists are supposed to be ordered lists! [...] The POD formatter should
>> be smart enough to decide if it has an ordered list or not.

> The telepathic powers of Pod "formatters" (i.e., parser-plus-renderers)
> are alas limited.

What Michael asks for is quite doable, though, even in HTML.  You can set
the numeric value of an <li> inside a <ol> with the value attribute, and
you can tell if all of the list items are numeric by going through all the
items before generating output for the list.

This would be a change from the original POD specification, though, which
says:

    If you start with bullets or numbers, stick with them, as formatters
    use the first "=item" type to decide how to format the list.

Supporting a sequence other than starting with 1 and incrementing by 1 is
also quite doable.  That's what the value attribute is for in HTML, and it
can be used if the number on an item isn't what one would have expected.

> So, sorry, but if people don't want their numbers to be mistaken for
> item-numbers, they just have to prefix with "#" or whatever to stop the
> line from being m/^=item\s+\d+\.?\s*$/s.  And if they are numbering,
> then they just have to start at 1 and continue by steps of one.

Pod::Man and Pod::Text do handle Michael's requirements; the additional
complexity is mostly coming from formats that have an internal
understanding of list that the formatter has to make match up with the
list in the POD.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to