- int fixed = m_WParser -> GetFontFixed(),
- italic = m_WParser -> GetFontItalic(),
- underlined = m_WParser -> GetFontUnderlined(),
- bold = m_WParser -> GetFontBold(),
- fsize = m_WParser -> GetFontSize();
-
- m_WParser -> CloseContainer();
- c = m_WParser -> OpenContainer();
- c -> SetAlignHor(wxHTML_ALIGN_LEFT);
- c -> SetIndent(m_WParser -> GetCharHeight(), wxHTML_INDENT_VERTICAL);
-
- m_WParser -> SetFontUnderlined(FALSE);
- m_WParser -> SetFontBold(FALSE);
- m_WParser -> SetFontItalic(FALSE);
- m_WParser -> SetFontFixed(TRUE);
- m_WParser -> SetFontSize(0);
- c -> InsertCell(new wxHtmlFontCell(m_WParser -> CreateCurrentFont()));
-
- {
- wxString cit;
- cit = m_WParser -> GetSource() -> Mid(tag.GetBeginPos(), tag.GetEndPos1() - tag.GetBeginPos());
- c -> InsertCell(new wxHtmlPRECell(cit, *(m_WParser -> GetDC())));
- }
-
- m_WParser -> SetFontUnderlined(underlined);
- m_WParser -> SetFontBold(bold);
- m_WParser -> SetFontItalic(italic);
- m_WParser -> SetFontFixed(fixed);
- m_WParser -> SetFontSize(fsize);
- c -> InsertCell(new wxHtmlFontCell(m_WParser -> CreateCurrentFont()));
+ int fixed = m_WParser->GetFontFixed(),
+ italic = m_WParser->GetFontItalic(),
+ underlined = m_WParser->GetFontUnderlined(),
+ bold = m_WParser->GetFontBold(),
+ fsize = m_WParser->GetFontSize();
+
+ c = m_WParser->GetContainer();
+ m_WParser->SetFontUnderlined(FALSE);
+ m_WParser->SetFontBold(FALSE);
+ m_WParser->SetFontItalic(FALSE);
+ m_WParser->SetFontFixed(TRUE);
+ m_WParser->SetFontSize(3);
+ c->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));
+
+ m_WParser->CloseContainer();
+ c = m_WParser->OpenContainer();
+ c->SetAlignHor(wxHTML_ALIGN_LEFT);
+ c->SetIndent(m_WParser->GetCharHeight(), wxHTML_INDENT_TOP);
+
+ wxString srcMid =
+ m_WParser->GetSource()->Mid(tag.GetBeginPos(),
+ tag.GetEndPos1() - tag.GetBeginPos());
+ // It is safe to temporarily change the source being parsed,
+ // provided we restore the state back after parsing
+ m_Parser->SetSourceAndSaveState(HtmlizeWhitespaces(srcMid));
+ m_Parser->DoParsing();
+ m_Parser->RestoreState();
+
+ m_WParser->CloseContainer();
+ c = m_WParser->OpenContainer();
+
+ m_WParser->SetFontUnderlined(underlined);
+ m_WParser->SetFontBold(bold);
+ m_WParser->SetFontItalic(italic);
+ m_WParser->SetFontFixed(fixed);
+ m_WParser->SetFontSize(fsize);
+ c->InsertCell(new wxHtmlFontCell(m_WParser->CreateCurrentFont()));