[pmwiki-devel] <dd> in the middle of <ul>?

12 views
Skip to first unread message

Peter Bowers

unread,
May 17, 2011, 12:50:22 AM5/17/11
to pmwiki-devel
I am trying to get a round-trip markup->html->markup and am having a
strange issue with bulleted lists.

This markup:

* LEVEL 1
*** LEVEL 3

(note the movement from a single * to 3 *s without an intermediate 2
*s) results in this HTML:

<ul><li>LEVEL 1
<dl><dd><ul><li>LEVEL 3
</li></ul></dd></dl></li></ul>

when I expected this HTML:

<ul><li>LEVEL 1
<ul><ul><li>LEVEL 3
</li></ul></ul></li></ul>

Is this intentional? Or is it a bug?

-Peter

_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Patrick R. Michaud

unread,
May 17, 2011, 2:19:39 AM5/17/11
to Peter Bowers, pmwiki-devel
On Tue, May 17, 2011 at 06:50:22AM +0200, Peter Bowers wrote:
> [...]

> when I expected this HTML:
>
> <ul><li>LEVEL 1
> <ul><ul><li>LEVEL 3
> </li></ul></ul></li></ul>
>
> Is this intentional? Or is it a bug?

It's intentional. The second line of what you expected is not valid
HTML or XHTML -- a <ul> block is only allowed to contain <li> elements.
(The "<ul><ul>" sequence is is invalid.) Fixing things to use <ul>
would therefore result in an extra layer of bullets in the output,
or we have to do weird things with style= or class= attributes to
avoid them.

The "***" markup simply means "unordered list at third level", it
doesn't mean that the lists at the first and second levels must
also be unordered lists.

Pm

Reply all
Reply to author
Forward
0 new messages