- wxString src, srcMid;
-
- src = *m_WParser->GetSource();
- srcMid = src.Mid(tag.GetBeginPos(),
- tag.GetEndPos1() - tag.GetBeginPos());
- srcMid.Replace(wxT("\t"), wxT(" "));
- srcMid.Replace(wxT(" "), wxT(" "));
- srcMid.Replace(wxT("\n"), wxT("<br>"));
-
- // It is safe to temporarily change the source being parsed,
- // provided we restore the state back after parsing
- m_Parser->SetSource(srcMid);
- m_Parser->DoParsing();
- m_Parser->SetSource(src);
-
+ wxString srcMid = m_WParser->GetInnerSource(tag);
+ ParseInnerSource(HtmlizeWhitespaces(srcMid));
+
+ m_WParser->CloseContainer();