- if (tag.GetName() == wxT("LI")) {
- if (!tag.IsEnding()) {
- m_WParser -> CloseContainer();
- m_WParser -> CloseContainer();
-
- c = m_WParser -> OpenContainer();
- c -> SetWidthFloat(2 * m_WParser -> GetCharWidth(), wxHTML_UNITS_PIXELS);
- c -> SetAlignHor(wxHTML_ALIGN_RIGHT);
+ if (tag.GetName() == wxT("LI"))
+ {
+ if (!tag.IsEnding())
+ {
+ m_WParser->GetContainer()->SetIndent(0, wxHTML_INDENT_TOP);
+ // this is to prevent indetation in <li><p> case
+ m_WParser->CloseContainer();
+ m_WParser->CloseContainer();
+
+ c = m_WParser->OpenContainer();
+ c->SetWidthFloat(2 * m_WParser->GetCharWidth(), wxHTML_UNITS_PIXELS);
+ c->SetAlignHor(wxHTML_ALIGN_RIGHT);