added ParseInnerSource() to make <pre>-like parsing easier

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-04-03 19:34:21 +00:00
parent 47eb93d02d
commit e7feeafa56
3 changed files with 27 additions and 8 deletions

View File

@@ -104,14 +104,8 @@ TAG_HANDLER_BEGIN(PRE, "PRE")
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();
wxString srcMid = m_WParser->GetInnerSource(tag);
ParseInnerSource(HtmlizeWhitespaces(srcMid));
m_WParser->CloseContainer();
m_WParser->CloseContainer();