From: TP <wi...@gm...> - 2010-03-28 06:16:44
|
Despite what class HTMLTranslator(nodes.NodeVisitor) in docutils/writers/html4css1/__init__.py says: - Regardless of the above, in definitions, table cells, field bodies, option descriptions, and list items, mark the first child with 'class="first"' and the last child with 'class="last"'. The stylesheet sets the margins (top & bottom respectively) to 0 for these elements. I notice that ALL list items are marked with class="first" and NO item is marked with class="last": <ul> <li><p class="first">Simple Item 1</p></li> <li><p class="first">Complex Item 2.</p> <p>Second part of complex item 2.</p> </li> <li><p class="first">Simple Item 3</p></li> </ul> I see a set_first_last(self, node) method, but using the debugger it never seems to get called when generating the above html. If I add a call to set_first_last() at the end of visit_bullet_list(), then the correct <li> elements are labeled as first & last, but the <p> elements are still all labeled as first. |