[Doc-SIG] compact HTML output from Docutils

David Goodger goodger@python.org
Mon, 16 Dec 2002 21:36:37 -0500

fantasai wrote:
> It would be more flexible for the author if you based the
> omission of <p> tags in single-paragraph lists on whether
> the list is spaced out or not. For example, this:

I'm happy with the current behavior, but that may have potential.
I'll add it as a "to do?" item and await a patch.

> Another option is to trigger <p> tags only for multi-line
> paragraphs.

Too arbitrary IMO.

> Have you tried using p:first-child? It would be nice to
> avoid cruft like 'class="first"'.

I did try it, but it didn't do what I needed.  The 'class="first"'
isn't added in all contexts, but selectively.  A 'p:first-child' style
isn't selective.  I don't remember the details, but a lot of things
were tried, and I feel the current code works best.

David Goodger  <goodger@python.org>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/