#217 table cells are not compacted

closed-fixed
nobody
HTML writer (6)
5
2013-01-21
2013-01-09
Kirill Simonov
No

Normally paragraphs in table cells are compacted, that is, the <p> tag inside <td> is stripped.
However such paragraphs are not compacted when the table itself is nested in a list.
This causes a problem when custom CSS styles are applied to <p> tags.

It happens because `visit_*_list` functions set `compact_p` flag to `None` and
`visit_table` does not reset it.

A sample file is attached.

Discussion

  • Kirill Simonov
    Kirill Simonov
    2013-01-09

     
    Attachments
  • Günter Milde
    Günter Milde
    2013-01-21

    • status: open --> closed-fixed
     
  • Günter Milde
    Günter Milde
    2013-01-21

    Fixed.

    Mind that the "strict" html writer keeps the <p> tags.
    Selective custom styling can be achieved with CSS rules like

    .compact p, th p, .simple p {margin-top: 0; margin-bottom: 0; }